Daily Industrial Wordl

This commit is contained in:
wordsmith
2022-02-07 18:50:13 -05:00
parent 135c0a8d0d
commit 8a1af6f9fa
6 changed files with 13 additions and 29 deletions

View File

@@ -157,7 +157,7 @@ function Game(props: GameProps) {
const onKey = (key: string) => {
if (gameState !== GameState.Playing) {
if (key === "Enter") {
startNextGame();
// startNextGame();
}
return;
}
@@ -192,9 +192,7 @@ function Game(props: GameProps) {
setCurrentGuess((guess) => "");
const gameOver = (verbed: string) =>
`You ${verbed}! The answer was ${target.toUpperCase()}. (Enter to ${
challenge ? "play a random game" : "play again"
})`;
`You ${verbed}! The answer was ${target.toUpperCase()}.`;
if (currentGuess === target) {
setHint(gameOver("won"));
@@ -287,7 +285,7 @@ function Game(props: GameProps) {
disabled={gameState !== GameState.Playing || guesses.length === 0}
onClick={() => {
setHint(
`The answer was ${target.toUpperCase()}. (Enter to play again)`
`The answer was ${target.toUpperCase()}.`
);
setGameState(GameState.Lost);
(document.activeElement as HTMLElement)?.blur();
@@ -318,21 +316,7 @@ function Game(props: GameProps) {
letterInfo={letterInfo}
onKey={onKey}
/>
<div className="Game-seed-info">
{challenge
? "playing a challenge game"
: seed
? `${describeSeed(seed)} — length ${wordLength}, game ${gameNumber}`
: "playing a random game"}
</div>
<p>
<button
onClick={() => {
share("Link copied to clipboard!");
}}
>
Share a link to this game
</button>{" "}
{gameState !== GameState.Playing && (
<button
onClick={() => {