Skip to content

AmrTamerTech/Stone_Paper_Scissor-CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Rock-Paper-Scissors Game ๐Ÿชจ๐Ÿ“œโœ‚๏ธ

A fun and interactive console-based Rock-Paper-Scissors game written in C++.
Play against the computer in multiple rounds and see who wins! ๐Ÿ†


๐Ÿ“Œ Features

โœ”๏ธ Supports up to 10 rounds per game.
โœ”๏ธ Randomized computer choices using rand().
โœ”๏ธ Real-time results after each round.
โœ”๏ธ Colored screen feedback:

  • โœ… Green if the player wins.
  • โŒ Red + Bell Sound if the computer wins.
  • ๐Ÿ”ถ Yellow for a draw.
    โœ”๏ธ Final Game Summary at the end of all rounds.
    โœ”๏ธ Option to play again after each game.

๐Ÿš€ How to Play

1๏ธโƒฃ Run the program.
2๏ธโƒฃ Enter the number of rounds (1 to 10).
3๏ธโƒฃ Choose your move:

  • ๐Ÿชจ 1 for Rock
  • ๐Ÿ“œ 2 for Paper
  • โœ‚๏ธ 3 for Scissors
    4๏ธโƒฃ The computer will randomly pick a move.
    5๏ธโƒฃ The winner of each round is determined based on standard rules:
  • ๐Ÿชจ Rock beats โœ‚๏ธ Scissors.
  • โœ‚๏ธ Scissors beat ๐Ÿ“œ Paper.
  • ๐Ÿ“œ Paper beats ๐Ÿชจ Rock.
    6๏ธโƒฃ After all rounds, the final winner is displayed.
    7๏ธโƒฃ Choose whether to play again or exit.

๐Ÿ› ๏ธ Code Overview

The game is built using C++ and structured into multiple functions:

๐Ÿ”น User Input: Reads player choice & number of rounds.
๐Ÿ”น Game Logic: Determines round winners based on game rules.
๐Ÿ”น Randomization: Uses rand() for computer moves.
๐Ÿ”น Screen Effects: Changes console color based on round results.
๐Ÿ”น Game Loop: Repeats the game if the player wants to play again.


๐ŸŽจ Visual Effects

  • ๐ŸŸฉ Green Screen โ†’ Player wins the round.
  • ๐ŸŸฅ Red Screen + Sound โ†’ Computer wins the round.
  • ๐ŸŸจ Yellow Screen โ†’ Round is a draw.

โš™๏ธ Technologies Used

๐Ÿ–ฅ๏ธ Language: C++
๐Ÿ“Œ Concepts: Loops, Functions, Structs, Enums, Randomization


๐Ÿ“œ License

This project is open-source. Feel free to modify and use it! ๐ŸŽ‰


๐Ÿค Contributions

Suggestions & improvements are always welcome!
Fork the repo and submit a Pull Request. ๐Ÿš€

About

A simple C++ console game for Stone-Paper-Scissors with multiple rounds, score tracking, and winner effects like screen color changes and sound alerts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages