Skip to content

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

Notifications You must be signed in to change notification settings

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

No packages published

Languages