A command-line Rock Paper Scissors game built with Python, featuring styled terminal output, sound effects, and score tracking.
- Terminal User Interface - ASCII art and styled text using the Rich library
- Sound Effects - Audio feedback for win, lose, tie, and click events with multiple fallback methods
- Score Tracking - Persistent score tracking throughout the game session
- Quick Input Support - Use shortcuts (
r,p,s) or full words (rock,paper,scissors) - Cross-Platform Compatibility - Works on Windows, macOS, and Linux
Rock-Paper-Scissors/
├── rock_paper_scissors.py # Main game file
├── requirements.txt # Python dependencies
├── sounds/ # Sound effects directory
│ ├── click.mp3 # Selection sound
│ ├── win.mp3 # Victory sound
│ ├── lose.mp3 # Defeat sound
│ └── tie.mp3 # Tie game sound
└── README.md
- Python 3.x
-
Clone the repository
git clone https://github.com/ReVuz/Rock-Paper-Scissors.git cd Rock-Paper-Scissors -
Install dependencies
pip install -r requirements.txt
-
Run the game
python rock_paper_scissors.py
| Package | Version | Description |
|---|---|---|
| rich | 13.7.0 | Terminal formatting and styling |
| pyfiglet | 1.0.2 | ASCII art text generation |
| playsound | 1.3.0 | Cross-platform audio playback |
| colorama | 0.4.6 | Cross-platform colored terminal text |
| termcolor | 2.3.0 | ANSI color formatting |
| tqdm | 4.66.1 | Progress bar library |
- Launch the game by running
python rock_paper_scissors.py - Enter your choice:
- Type
rockorrfor Rock - Type
paperorpfor Paper - Type
scissorsorsfor Scissors
- Type
- View the result and updated scores
- Type
quitto exit and display final scores
The game supports sound effects through multiple methods:
- Pygame (recommended) - Most reliable cross-platform audio
- winsound (Windows only) - Built-in Windows sound support
- playsound - Fallback audio player
If no audio libraries are available, the game will display visual feedback instead.
To use custom sounds, place .mp3 files in the sounds/ directory with the following names:
click.mp3- Played when making a selectionwin.mp3- Played when the player wins a roundlose.mp3- Played when the player loses a roundtie.mp3- Played when the round is a tie
Contributions are welcome. Please feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
This project is open source and available under the MIT License.