diff --git a/workspaces/simon-game/src/app/components/App.tsx b/workspaces/simon-game/src/app/components/App.tsx index b04df109..5359b2ee 100644 --- a/workspaces/simon-game/src/app/components/App.tsx +++ b/workspaces/simon-game/src/app/components/App.tsx @@ -4,8 +4,32 @@ import { Box } from "./Box.tsx"; import { playNote } from "../util/playNote.ts"; import { config } from "../constants.ts"; +type GameState = "pre-game" | "game-over" | "player-turn" | "cpu-turn"; + export function App() { const [playerMoves, setPlayerMoves] = useState([]); + const [gameState, setGameState] = useState("pre-game"); + const [_correctMoves, _setCorrectMoves] = useState([ + 0, 1, 2, 3, + ]); + + console.log(_correctMoves, _setCorrectMoves); + + if (gameState === "pre-game") { + return ( +
+ + Simon Game +
+ ); + } + return ( <>