Rock, paper, and scissors game is a simple fun game in which both the players have to make a rock, paper, or scissors. It has only two possible outcomes a draw, or a win for one player and a loss for the other player. We will be designing the game using JavaScript where a player will be playing against the computer. The player has to choose one option among the rock, paper, and scissors. A random option will be generated from the computer’s side and the result will be displayed on the screen. The game is completely responsive so that it can be played on every device.
- Since this game is developed in HTML, CSS and vanilla JavaScript, its very easy to run this app.
- Fork or downloaad this repository.
- Copy the absolute path of the index.html file
- Open a browser and paste the copied path to the URL box and hit enter.
- Alternatively, open the project folder inside vscode and install extension 'Live Server'.
- Click the button saying 'Go Live' at the bottom-right of vscode window.
- App will be served at http://127.0.0.1:5500/index.html
- On Start screen, click on button saying play.
- Choose between rock, paper or scissor icons displaying on the screen.
- After you made your choice, computer will made its choice.
- If you win, you will see a message saying you win! and similar messages for other results i.e. draw or lose.
- Rock✊ beats scissors✌️
- scissors✌️ beats paper✋ and
- paper✋ beats rock✊