Skip to content

ali-aboulsauood/rock-paper-scissors-cpp

Repository files navigation

Rock, Paper, Scissors

This project was created as part of a course offered by ProgrammingAdvices.

This is a simple practice project for a game of Rock, Paper, Scissors - written in C++.

Installation and Launch

Download RockPaperScissors.exe and run the executable (the game).

Rules and Instructions

Basic instructions are provided in the game itself. The following describes the game rules and instructions in more detail.

There is also a demo video that shows how the game works

  1. Enter the number of rounds you wish to play, then press Enter to confirm.

  2. In each round, enter the number corresponding to the item you wish to use (Rock, Paper, or Scissors), then press Enter to confirm.

    The computer will then randomly choose an item of the three aforementioned.

    The result of the round is evaluated based on the traditional rules of Rock, Paper, Scissors: If both you and the computer choose the same item, the round is tied, and if otherwise, the winner of the round is the one whose item defeats the other's: Rock is defeated by Paper, Paper is defeated by Scissors, Scissors are defeated by Rock.

    The console background color becomes green if you win the round, and red if you lose.

    Note that a round that is tied is not replayed again.

A chart showing how the three game elements of "Rock-paper-scissors" interact.


After finishing the number of rounds you have specified, the console background color becomes green if you won the game (the number of rounds you have won is greater than that of the computer), red if you lost (the number of rounds you have lost is smaller than that of the computer), or yellow if the game is tied (the number of rounds you have won is the same as that of the computer).

The Results screen shows the number of rounds you have specified for the game, the number of rounds you have won against, lost to, and were at a draw with the computer, and whether you won/lost/were at a draw during the game. There is an option to start a new game.

Future Updates

Allah willing, the game is going to have both console and GUI editions, and the following features:

  1. The option to play against the computer or another human player.
  2. The option to have a time limit for the (each) player's turn in each round.
  3. The option for a countdown timer for the computer before its choice is revealed (suspense!)
  4. An option to export game results to a text or an HTML file.
  5. An option to start a new quiz with the same settings chosen for the last game.

Suggestions and Contributions

If you have any suggestions regarding the program, feel free to email me or message me LinkedIn.

If you are a programmer or still learning to program, feel free to contribute to my project: Rock, Paper, Scissors Github Repository.

About

A simple practice project for a game of Rock, Paper, Scissors..

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages