Experience the classic game of Rock-Paper-Scissors in this sleek Python implementation. Challenge the computer in a battle of wits and strategy!
- 🪨 Rock crushes ✂️ Scissors
- ✂️ Scissors cuts 📄 Paper
- 📄 Paper covers 🪨 Rock
- If both players choose the same option, it's a tie!
- Ensure you have Python installed on your system.
- Run the game using the command:
python rock_paper_scissors.py
- Make your choice by entering:
1
for Rock 🪨2
for Paper 📄3
for Scissors ✂️
- Watch as the computer makes its move.
- See the result and your updated score.
- Choose to play again or exit the game.
We use Python's Enum
class to represent game choices:
from enum import Enum
class RPS(Enum):
ROCK = 1
PAPER = 2
SCISSORS = 3
This enhances code readability and maintainability by using meaningful names instead of magic numbers.
- Observe patterns in the computer's choices to gain an edge.
- Mix up your choices to keep the computer guessing.
- Remember, in the long run, a truly random strategy is often the best!
- Implement a GUI for a more interactive experience.
- Add difficulty levels for the computer player.
- Include a leaderboard to track high scores.
Khaled Soudy
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any problems or have any questions, please open an issue in the GitHub repository.
Enjoy the game and may the odds be ever in your favor! 🍀