https://github.com/mirokrastanov/rockpaperscissors
🪨📄✂️ Web-based JavaScript implementation of the popular "Rock Paper Scissors" game. (Small Project))
https://github.com/mirokrastanov/rockpaperscissors
game javascript web
Last synced: over 1 year ago
JSON representation
🪨📄✂️ Web-based JavaScript implementation of the popular "Rock Paper Scissors" game. (Small Project))
- Host: GitHub
- URL: https://github.com/mirokrastanov/rockpaperscissors
- Owner: mirokrastanov
- License: mit
- Created: 2022-10-06T08:06:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T15:05:11.000Z (about 2 years ago)
- Last Synced: 2024-05-30T05:05:52.845Z (about 2 years ago)
- Topics: game, javascript, web
- Language: JavaScript
- Homepage: https://app-library-13e36.web.app/apps/rps
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RockPaperScissors
A simple console-based JavaScript implementation of the "Rock - Paper - Scissors" game.
## Live Demo
[
](https://app-library-13e36.web.app/apps/rps)
### The Demo is now part of my app library
- Check out the [App Library](https://app-library-13e36.web.app/)
## Description
Rock - Paper - Scissors is a simple two player game, where you and your opponent (the computer) simultaneously choose one of the following three options: "rock", "paper" or "scissors". The rules are as follows:
- Rock beats scissors (the scissors get broken by the rock)
- Scissors beat paper (the paper gets cut by the scissors)
- Paper beats rock (the rock gets covered by the paper)
The winner is the player whose choice beats the choice of his opponent. If both players choose the same option, the game ends with a draw.
## Input & Output
- `rock` or `r`
- `paper` or `p`
- `scissors` or `s`
The computer chooses a random option, then the winner is revealed.
## Game Logic | Possible Scenarios
|YOU|COMPUTER|OUTCOME|
| :--: | :--: | :--: |
|rock|rock|Draw|
|rock|paper|You lose|
|rock|scissors|You win|
|paper|rock|You win|
|paper|paper|Draw|
|paper|scissors|You lose|
|scissors|rock|You lose|
|scissors|paper|You win|
|scissors|scissors|Draw|
## Live Demo
[
](https://app-library-13e36.web.app/apps/rps)
- [Original Source Code](https://github.com/mirokrastanov/RockPaperScissors)
- [React Implementation Code for the App Library](https://github.com/mirokrastanov/app-library/tree/main/client/src/apps/rps)