Welcome to the Dice Roller repository! This lightweight and flexible Python tool simulates dice rolls, making it perfect for tabletop games, RPGs, and probability testing. Whether you are rolling a D20 for your next Dungeons & Dragons session or just curious about dice probabilities, this tool has you covered.
- 🎲 Multiple Dice Types: Roll different types of dice, including D4, D6, D8, D10, D12, and D20.
- ⚙️ Flexible Configuration: Customize the number of dice and the sides for each roll.
- 📊 Probability Testing: Analyze the likelihood of various outcomes.
- 🖥️ Command-Line Interface: Easy to use from the terminal.
To install the Dice Roller, follow these steps:
-
Clone the Repository:
git clone https://github.com/akashrana7/dice-roller.git cd dice-roller
-
Install Dependencies:
Make sure you have Python installed. You can install the required packages using pip:
pip install -r requirements.txt
After installation, you can start using the Dice Roller tool directly from your command line. The basic command structure is:
python dice_roller.py [options]
To roll a single die, use the following command:
python dice_roller.py roll D6
This command rolls a six-sided die.
To roll multiple dice, you can specify the number of dice and the type:
python dice_roller.py roll 3D20
This command rolls three twenty-sided dice.
You can analyze the probability of rolling a specific number with a certain die:
python dice_roller.py probability D10 7
This command checks the probability of rolling a 7 on a ten-sided die.
Here are some examples of how to use the Dice Roller:
-
Rolling a D20:
python dice_roller.py roll D20
Output:
You rolled a 14 on a D20!
-
Rolling Multiple D6:
python dice_roller.py roll 5D6
Output:
You rolled: [3, 5, 2, 6, 1] Total: 17
-
Probability Testing:
python dice_roller.py probability D4 2
Output:
The probability of rolling a 2 on a D4 is 25%.
We welcome contributions to improve the Dice Roller tool. If you want to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request.
Please ensure your code follows the style guidelines and includes tests where applicable.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, feel free to reach out:
- Email: your-email@example.com
- Twitter: @your_twitter_handle
To download the latest version of Dice Roller, visit the Releases section. Here, you can find the latest files that need to be downloaded and executed.
You can also check the releases for updates and new features.
Thank you for checking out the Dice Roller! Enjoy your gaming experience, and may the odds be ever in your favor!