feat: add 7th guess with 60s unlock and update docs

This commit is contained in:
Hördle Bot
2025-11-21 19:25:38 +01:00
parent 7ce45be90d
commit 95a3b09f52
4 changed files with 20 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ interface GameProps {
} | null;
}
const UNLOCK_STEPS = [2, 4, 7, 11, 16, 30];
const UNLOCK_STEPS = [2, 4, 7, 11, 16, 30, 60];
export default function Game({ dailyPuzzle }: GameProps) {
const { gameState, statistics, addGuess } = useGameState();
@@ -48,17 +48,17 @@ export default function Game({ dailyPuzzle }: GameProps) {
setHasWon(true);
} else {
addGuess(song.title, false);
if (gameState.guesses.length + 1 >= 6) {
if (gameState.guesses.length + 1 >= 7) {
setHasLost(true);
}
}
};
const unlockedSeconds = UNLOCK_STEPS[Math.min(gameState.guesses.length, 5)];
const unlockedSeconds = UNLOCK_STEPS[Math.min(gameState.guesses.length, 6)];
const handleShare = () => {
let emojiGrid = '';
const totalGuesses = 6;
const totalGuesses = 7;
// Build the grid
for (let i = 0; i < totalGuesses; i++) {
@@ -110,7 +110,7 @@ export default function Game({ dailyPuzzle }: GameProps) {
<div style={{ borderBottom: '1px solid #e5e7eb', paddingBottom: '1rem' }}>
<div className="status-bar">
<span>Attempt {gameState.guesses.length + 1} / 6</span>
<span>Attempt {gameState.guesses.length + 1} / 7</span>
<span>{unlockedSeconds}s unlocked</span>
</div>
<AudioPlayer
@@ -140,7 +140,7 @@ export default function Game({ dailyPuzzle }: GameProps) {
onClick={() => addGuess("SKIPPED", false)}
className="skip-button"
>
Skip (+{UNLOCK_STEPS[Math.min(gameState.guesses.length + 1, 5)] - unlockedSeconds}s)
Skip (+{UNLOCK_STEPS[Math.min(gameState.guesses.length + 1, 6)] - unlockedSeconds}s)
</button>
</>
)}