From a688c304274bc542e763ad09c4626d3672a562bc Mon Sep 17 00:00:00 2001 From: Lynn Date: Fri, 14 Jan 2022 17:19:42 +0100 Subject: [PATCH] Cherry-pick the good stuff from input-per-letter --- src/Game.tsx | 8 ++++++-- src/Row.tsx | 2 +- src/clue.ts | 2 +- src/targets.json | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Game.tsx b/src/Game.tsx index eabdea2..af28dc4 100644 --- a/src/Game.tsx +++ b/src/Game.tsx @@ -73,7 +73,9 @@ function Game(props: GameProps) { setGuesses((guesses) => guesses.concat([currentGuess])); setCurrentGuess((guess) => ""); if (currentGuess === target) { - setHint("You won! (Enter to play again)"); + setHint( + `You won! The answer was ${target.toUpperCase()}. (Enter to play again)` + ); setGameState(GameState.Won); } else if (guesses.length + 1 === props.maxGuesses) { setHint( @@ -170,7 +172,9 @@ function Game(props: GameProps) { Give up - {tableRows}
+ + {tableRows} +

{hint || `\u00a0`}

{/*

{srStatus} diff --git a/src/Row.tsx b/src/Row.tsx index 6c9fa49..44e599d 100644 --- a/src/Row.tsx +++ b/src/Row.tsx @@ -27,7 +27,7 @@ export function Row(props: RowProps) {