Fix: Prevent bonus round reappearance on reload and enable autoplay after wrong guess

This commit is contained in:
Hördle Bot
2025-11-23 22:23:51 +01:00
parent 4d807c77d0
commit 015862ce0c
2 changed files with 17 additions and 3 deletions

View File

@@ -257,5 +257,18 @@ export function useGameState(genre: string | null = null, maxAttempts: number =
saveState(newState);
};
return { gameState, statistics, addGuess, giveUp, addReplay, addYearBonus };
const skipYearBonus = () => {
if (!gameState) return;
const newBreakdown = [...gameState.scoreBreakdown, { value: 0, reason: 'Bonus: Skipped' }];
const newState = {
...gameState,
scoreBreakdown: newBreakdown,
yearGuessed: true
};
saveState(newState);
};
return { gameState, statistics, addGuess, giveUp, addReplay, addYearBonus, skipYearBonus };
}