Fix Northcott's Game
Respect user-selected modes in random mode and add spacing.
This commit is contained in:
parent
35ec94ec40
commit
92026405a1
1 changed files with 2 additions and 2 deletions
|
|
@ -237,7 +237,7 @@ const NorthcottsGame: React.FC<NorthcottsGameProps> = ({ showSocialShare = false
|
||||||
const randomGame = () => {
|
const randomGame = () => {
|
||||||
const rows = 3 + Math.floor(Math.random() * 8); // 3-10
|
const rows = 3 + Math.floor(Math.random() * 8); // 3-10
|
||||||
const cols = 3 + Math.floor(Math.random() * 8); // 3-10
|
const cols = 3 + Math.floor(Math.random() * 8); // 3-10
|
||||||
setGameState(initializeGame(rows, cols, gameState.misereMode, false, gameState.forwardOnly));
|
setGameState(initializeGame(rows, cols, gameState.misereMode, gameState.cleanStart, gameState.forwardOnly));
|
||||||
};
|
};
|
||||||
|
|
||||||
const toggleMisereMode = () => {
|
const toggleMisereMode = () => {
|
||||||
|
|
@ -347,7 +347,7 @@ const NorthcottsGame: React.FC<NorthcottsGameProps> = ({ showSocialShare = false
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Board Size and Game Control Row */}
|
{/* Board Size and Game Control Row */}
|
||||||
<div className="flex flex-wrap gap-4 items-center justify-center">
|
<div className="flex flex-wrap gap-4 items-center justify-center mt-3">
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<Label>Rows:</Label>
|
<Label>Rows:</Label>
|
||||||
<Select value={gameState.rows.toString()} onValueChange={(v) => changeBoardSize(parseInt(v), gameState.cols)}>
|
<Select value={gameState.rows.toString()} onValueChange={(v) => changeBoardSize(parseInt(v), gameState.cols)}>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue