From 5a8100f7207c57fac2acf3bfbe6c3361d66c2b9d Mon Sep 17 00:00:00 2001 From: Lynn Date: Mon, 3 Jan 2022 16:17:36 +0100 Subject: [PATCH] Add an "About" link --- src/App.css | 15 ++++++++-- src/App.tsx | 82 ++++++++++++++++++++++++++++++++++++++++++++++------ src/Game.tsx | 3 +- src/names.ts | 2 ++ 4 files changed, 90 insertions(+), 12 deletions(-) diff --git a/src/App.css b/src/App.css index 1ec2601..ef91d90 100644 --- a/src/App.css +++ b/src/App.css @@ -25,14 +25,19 @@ body { font-weight: bold; } -.App { +.App-container { + position: relative; + max-width: 500px; display: flex; flex-direction: column; - max-width: 500px; margin: 0 auto; justify-content: center; } +.App-container h1 { + margin-top: 0; +} + .Game { display: flex; flex-direction: column; @@ -152,4 +157,10 @@ a:active { .App-footer { margin: -1rem 0 2rem 0; font-size: 80%; + line-height: 1.5; } + +.App-about { + margin-top: -1rem; + line-height: 1.4; +} \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 932bdc7..0991b45 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,20 +4,84 @@ import { dictionarySet, pick } from "./util"; import Game from "./Game"; import { names } from "./names"; import { useState } from "react"; +import { Row, RowState } from "./Row"; +import { Clue } from "./clue"; function App() { + const [about, setAbout] = useState(false); + const maxGuesses = 6; return ( - <> +

hello wordl

- -
- +
+ setAbout((a) => !a)}> + {about ? "Close" : "About"} +
- + {about && ( +
+

+ hello wordl is a remake of the word game{" "} + + Wordle + + , which I think is based on the TV show Lingo. +

+

+ You get {maxGuesses} tries to guess a target word. +
+ After each guess, you get Mastermind-style feedback: +

+

+ +

+

+ W and O aren't in the target word at all. +
+ R is correct! The third letter is R + .
+ D occurs elsewhere in the target + word. +

+

+ Let's move the D in our next guess: + + So close! + + Got it! +

+ Report issues here, or tweet @chordbug. +
+ )} +
); } diff --git a/src/Game.tsx b/src/Game.tsx index 023ecf3..1687c83 100644 --- a/src/Game.tsx +++ b/src/Game.tsx @@ -15,6 +15,7 @@ enum GameState { interface GameProps { maxGuesses: number; + hidden: boolean; } const targets = common @@ -120,7 +121,7 @@ function Game(props: GameProps) { }); return ( -
+
= new Set([ "carol", "costa", "dutch", + "fossa", // just too hard "harry", "jimmy", "jones", @@ -13,6 +14,7 @@ export const names: Set = new Set([ "pedro", "roger", "sally", + "savoy", "texas", "willy", ]);