This repository contains a JavaScript program for a simple Rock-Paper-Scissors game.
How to Play:
- Clone or download the repository.
- Open the index.html file (or any HTML file that references the script) in your web browser.
- Click "Run" or refresh the page.
- The game will prompt you to enter your choice (rock, paper, or scissors) for each of the five rounds.
- After each round, the winner will be displayed.
- At the end of the game, the overall winner and scores will be shown.
Functionality:
- The game uses JavaScript functions to generate the computer's choice, get the user's choice, determine the winner of each round, and keep track of the score.
- The game logic utilizes modulo operation (%) to determine the winner based on the difference between the player's and computer's choices.
Live preview: Rock-Paper-Scissors