this project was bootstrapped using:
npx create-react-app client --template @chakra-ui/typescript
- home page
- selectCategories page
- game board
- question page overlay
- question response overlay
- options menu overlay
- game summary
- build random categories and start game functionality
- selecting question
- answering question
- timing a question
- persisting answered questions to state
- determing a valid response
- displaying score
- switching turns
- random question selection
- random answering
- recalculate score with 2 players
- determing a win(all questions answered)
- showing summary
- restarting game (play again)
- quiting a game early
- resume a game on browser close
game: {
categories : []
answers: []
}
clues : [ {
... category,
clues: []
} ]
currentClue: {
...clue,
location
}
only persist categories and answers to localstorage. then use categories to find all clues. use clues to build the game board and store each answer in the answer array. use the answer array to tally the scores and the game summary. use the answer array to determine when all questions have been answered.
- component level state in the gameboard component
- persist categories and answers to localstorage