DEV Community

IBRAHIM
IBRAHIM

Posted on

REACTION GAME test your reaction speed

Check out this Pen I made!

Top comments (1)

Collapse
 
ibrahim_aln profile image
IBRAHIM

How the Game Works

  1. Start:

    • The button is gray and says "Wait for Green...".
    • After a random delay (1 to 5 seconds), the button turns green and says "Click Now!".
  2. Player Reaction:

    • The player must click the button as quickly as possible when it turns green.
    • The game calculates the reaction time in milliseconds.
  3. Stats:

    • The game displays the player’s reaction time and their best (fastest) time.
  4. Restart:

    • After each click, the game restarts automatically.