This is a redo of the tenzies game project that is taught in Scrimba's learn React for free course with my own added features
Tenzies is a 10-dice game and you win when you are able to roll your dice till all dice have the same number, in the shortest possible time.
Players should be able to:
- Roll the dice using a roll button
- Hold die in place when it is clicked
- See a confetti when they win the game
- React
- React-confetti
- React-hook (useWindowSize)
- React-timer-hook (useStopWatch)
- LocalStorage
- SASS
useEffect in React can be used to keep two or more states in sync. This is what was used to check if all the dice were the same and had the same value.
I am looking to add the following features to the game on my own to practice and gain more experience.
- An overlay screen that displays score details
- Time taken to complete game
- Number of rolls made to complete game
- Best number of rolls, i.e the least number of rolls made to win
- Best time, i.e the leat time taken to win
In my bid to add a timer, I came accros the react-timer-hook package that helps implement stop watches, timers and dates. This is what I used to track the time taken to win the game. I also came accross the useWindowSize hook that helped with making the confetti that plays on the screen after a win responsive.
- Website - Maame Yaa Serwaa Bona-Mensa
- Twitter - @mys_bm