React Mini Projects

Squid Game

Exercise

Write a simple game as follows:

  • display a box randomly toggles between green and red
  • the goal is to click 15 times on the green box within 15 seconds
  • the player loses if they click red or they run out of time
  • each colour is displayed for somewhere between 1 and 2 seconds (randomly within these limits)
  • Credit: reacterry.com

Example

Score: 0

Press Start to Play