A command-line dice game built with Python where players can play against the computer or another player.
The game uses random dice rolls, score tracking, multiple rounds, and simple turn-based gameplay.
- 🎮 Two Game Modes
- Player vs Computer
- Player vs Player
- 🎲 Random Dice Rolls (1–6)
- 🔄 Turn-Based Gameplay
- 🏆 Score Comparison & Winner Announcement
- 📜 Rules Section
- 🛡️ Basic Input Handling
- 🎯 Multiple Round Support
- 🖥️ CLI (Command Line Interface)
- Python 3
- Functions
- Loops (
while,for) - Conditional Statements
- Exception Handling (
try-except) - User Input Handling
- Random Module
- Score Tracking Logic
Dice-Master-Game/
│── dice_game.py
│── README.md
- Enter player name.
- Choose number of rounds.
- Player and computer roll dice turn by turn.
- Scores are added after every roll.
- Highest total score wins.
- Enter names of both players.
- Choose number of rounds.
- Players roll dice alternately.
- Scores are calculated.
- Player with the highest score wins.
- Game is turn-based.
- Press Enter to roll the dice.
- Dice generates a random number from 1 to 6.
- Total score is calculated across rounds.
- Highest score wins the match.
python dice_game.py🎲 DICE MASTER 🎲
1 - Play with computer
2 - Play with player
3 - Show rules
Enter Your Choice : 1
Enter player name : Amar
Enter number of rounds : 3
Amar got - 5 🎲
Computer got - 2 🎲
--- Amar wins ---🏆
✔ Two playable game modes
✔ Uses Python's random module for dice generation
✔ Turn-based gameplay system
✔ Supports multiple rounds
✔ Handles invalid inputs with default values
Amarnath Rastogi