Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฒ Dice Master Game (Python)

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.


๐Ÿš€ Features

  • ๐ŸŽฎ 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)

๐Ÿ› ๏ธ Technologies & Concepts Used

  • Python 3
  • Functions
  • Loops (while, for)
  • Conditional Statements
  • Exception Handling (try-except)
  • User Input Handling
  • Random Module
  • Score Tracking Logic

๐Ÿ“‚ Project Structure

Dice-Master-Game/
โ”‚โ”€โ”€ dice_game.py
โ”‚โ”€โ”€ README.md

โš™๏ธ How The Game Works

Mode 1 โ€” Player vs Computer

  1. Enter player name.
  2. Choose number of rounds.
  3. Player and computer roll dice turn by turn.
  4. Scores are added after every roll.
  5. Highest total score wins.

Mode 2 โ€” Player vs Player

  1. Enter names of both players.
  2. Choose number of rounds.
  3. Players roll dice alternately.
  4. Scores are calculated.
  5. Player with the highest score wins.

๐ŸŽฏ Game Rules

  • 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.

โ–ถ๏ธ Run The Program

python dice_game.py

๐Ÿ’ป Example Output

๐ŸŽฒ 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 ---๐Ÿ†

๐Ÿ“Œ Key Highlights

โœ” 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


๐Ÿ‘จโ€๐Ÿ’ป Author

Amarnath Rastogi

About

A simple and interactive dice game built with Python featuring Player vs Computer and Player vs Player modes.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages