fix initial hint
This commit is contained in:
parent
6fad706552
commit
f7a9c4a4c2
1 changed files with 6 additions and 6 deletions
|
@ -65,11 +65,7 @@ export function Game(props: GameProps) {
|
||||||
3: defaultPuzzleStats(),
|
3: defaultPuzzleStats(),
|
||||||
4: defaultPuzzleStats(),
|
4: defaultPuzzleStats(),
|
||||||
});
|
});
|
||||||
const [hint, setHint] = useState<JSX.Element | string>(
|
const [hint, setHint] = useState<JSX.Element | string>('');
|
||||||
<p>
|
|
||||||
Try to guarantee a win in <strong>2 guesses</strong>!
|
|
||||||
</p>
|
|
||||||
);
|
|
||||||
const [shareMsg, setShareMsg] = useState("");
|
const [shareMsg, setShareMsg] = useState("");
|
||||||
const tableRef = useRef<HTMLTableElement>(null);
|
const tableRef = useRef<HTMLTableElement>(null);
|
||||||
const game = useMemo(
|
const game = useMemo(
|
||||||
|
@ -135,7 +131,11 @@ export function Game(props: GameProps) {
|
||||||
setHint(<p>Not quite! The answer could've been <strong>{game.possible_word().toUpperCase()}</strong>. (Enter to try again)</p>);
|
setHint(<p>Not quite! The answer could've been <strong>{game.possible_word().toUpperCase()}</strong>. (Enter to try again)</p>);
|
||||||
} else {
|
} else {
|
||||||
setGameState(GameState.Playing);
|
setGameState(GameState.Playing);
|
||||||
setHint("");
|
if (selectedPuzzle.guesses?.length) {
|
||||||
|
setHint("");
|
||||||
|
} else {
|
||||||
|
setHint(<p>Try to guarantee a win in <strong>2 guesses</strong>!</p>);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [puzzle, puzzleType, todayStats]);
|
}, [puzzle, puzzleType, todayStats]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue