This project is a simple implementation of the classic Rock-Paper-Scissors game. The game is controlled by key presses and allows you to play against the computer. The scoreboard updates after each round, tracking both your wins and the computer's wins.
- Play Rock-Paper-Scissors by pressing keys
1(Rock),2(Paper), or3(Scissors). - Computer randomly selects Rock, Paper, or Scissors each round.
- Tracks wins for both the player and the computer.
- Displays a result for each round: win, lose, or draw.
- Option to reset the game by pressing
0.
- Open the webpage.
- Use the following keys to make your choice:
1for Rock2for Paper3for Scissors
- The computer will randomly select its choice, and the result (win/lose/draw) will be displayed.
- Your score and the computer's score will be updated after each round.
- Press
0to reset the game.
index.html: The main HTML structure for the game.style.css: Contains the styling for the game interface.script.js: Handles the game logic (key press events, game outcome, and scoreboard updates).
- Clone the repository:
git clone https://github.com/your-username/rock-paper-scissors.git
- Open
index.htmlin your browser to start playing the game.
Feel free to open issues or submit pull requests if you'd like to improve the project!
This project is licensed under the MIT License. See the LICENSE file for details.