Here is a simple Rock, Paper and Scissors that is written in C++.
You can play the game in Player v/s CPU mode as well PvP mode.
Basic Rules
How to play the game?
Single Player Mode
Two Player Mode
Player 1 | Player 2 | Outcome |
---|---|---|
Rock | Scissor | P1 point |
Rock | Paper | P2 point |
Rock | Rock | 1 point each |
Paper | Scissor | P1 point |
Paper | Rock | P2 point |
Paper | Paper | 1 point each |
Scissor | Paper | P1 point |
Scissor | Rock | P2 point |
Scissor | Scissor | 1 point each |
The game starts by asking for the number of players.
)
Game Window: Asking number of players
Once it starts, you have to enter the number of rounds (after how many times the winner will be selected).
Game Window: Single Player mode
The CPU will generate randomly among Rock, Paper and Scissor. You will have to choose yours by entering 1,2 or 3.
One with more points after the given number of rounds will win the game. You will also be asked whether start a new game or not.
If you want to play the 2p mode, first you will have to enter first and second player's name.
)
Game Window: Two Player mode
After that the game continues the same as in 1p.
Thank you for reading. Please inform me if you found any bug, that will be appreciated.