Click here to see it live: https://victorzottmann.github.io/rock-paper-scissors/
This project is based on the Rock Paper Scissors game, where the player competes against the computer by choosing one of three options: rock
, paper
, or scissors
.
The winner of each round is determined based on the rules of the game:
- Rock beats scissors
- Scissors beat paper
- Paper beats rock
-
Player vs. Computer Gameplay: The player can make a choice between rock, paper, or scissors, and the computer makes a random choice.
-
Score Tracking: The game keeps track of the player's score and the computer's score throughout the game.
-
Round Management: The game consists of a total of 5 rounds, with the winner of each round earning a point. At the end of each round, a the game displayes a message indicating the outcome of the round (e.g. Rock beats scissors).
-
Game Over Status: After the game ends, a message is displayed indicating whether the player won, lost, or tied the game.
-
Click the
Start Game
button to begin. -
Click on one of the buttons (
rock
,paper
, orscissors
) to make your choice. The computer will randomly select its choice. -
Once you reach the 5th round, the game will end, and a game over message will be displayed.
-
To restart the game, click on the
Play Again
button after the game ends.
index.html
: Contains the structure of the game layout and user interface elements.style.css
: Defines the styles and appearance of the game.script.js
: Implements the game logic and functionality using JavaScript.data.js
: Stores the outcomes of each possible combination of player and computer choices.README.md
: Documentation file containing information about the game.