Rock-Paper-Scissors

Demo

Check the live demo here ⭐

Preview

Preview

This is a simple rock-paper-scissors game built with JavaScript. To play, simply click on one of the three buttons: rock, paper, or scissors. The computer will then randomly choose a move, and the winner will be determined based on the following rules:

  • Rock beats scissors
  • Scissors beats paper
  • Paper beats rock

If the player and computer tie, the game is a draw.

The game keeps track of the player's and computer's scores, and the scores are saved in local storage.

How to Play

  1. Click on the "rock", "paper", or "scissors" button.
  2. The computer will randomly choose a move.
  3. The winner will be determined based on the rules above.
  4. The player's and computer's scores are updated.
  5. To start a new round, click on the "next round" button.
  6. To reset the scores, click on the "restart" button.

Requirements

  • A web browser that supports JavaScript