The Dice Roller CLI game is a simple command-line program written in Python that allows you to simulate rolling a dice with a specified number of sides. This documentation provides an overview of the game, its features, and instructions on how to use it.
- Simulate rolling a dice with a specified number of sides.
- Handle invalid inputs and provide informative error messages.
- User-friendly command-line interface.
Before using the Dice Roller CLI game, make sure you have Python installed on your system. You can download Python from python.org.
To use the Dice Roller CLI game:
-
Clone repo
git clone https://github.com/Freddy155/cli-dice-roller.git
-
Navigate to the directory where the
app.py
file is located.cd cli-dice-roller
-
Run the script with the following command:
python app.py
-
The program will prompt you to enter the number of sides for the dice.
-
Enter the desired number of sides and press Enter.
-
The program will simulate the dice roll and display the result.
-
You can keep rolling the dice by entering a new number of sides or enter
0
to exit the program.
-
Rolling a 6-sided dice:
Enter the number of sides for the dice (or 0 to quit): 6 You rolled a 6-sided dice and got: 4
-
Rolling a 20-sided dice:
`Enter the number of sides for the dice (or 0 to quit): 20 You rolled a 20-sided dice and got: 17
-
Exiting the game:
Enter the number of sides for the dice (or 0 to quit): 0 Goodbye!
To exit the Dice Roller CLI game, simply enter 0
when prompted for the number of sides. The program will display "Goodbye!" and terminate.
If you would like to contribute to the development of the Dice Roller CLI game or report issues, please visit the project's GitHub repository at GitHub - Dice Roller CLI.