Fix Northcott's Game

Respect user-selected modes in random mode and add spacing.
This commit is contained in:
gpt-engineer-app[bot] 2025-07-21 06:48:56 +00:00
parent 35ec94ec40
commit 92026405a1

View file

@ -237,7 +237,7 @@ const NorthcottsGame: React.FC<NorthcottsGameProps> = ({ showSocialShare = false
const randomGame = () => {
const rows = 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 = () => {
@ -347,7 +347,7 @@ const NorthcottsGame: React.FC<NorthcottsGameProps> = ({ showSocialShare = false
</div>
{/* 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">
<Label>Rows:</Label>
<Select value={gameState.rows.toString()} onValueChange={(v) => changeBoardSize(parseInt(v), gameState.cols)}>