Giter Site home page Giter Site logo

lmisea / dicemaster Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 85 KB

DiceMaster is a Python project that can be used for rolling any quantity of dice of any number of faces. It is also my first Python project by the way :D

License: GNU General Public License v3.0

Python 100.00%
dice dice-roller roll-dice dnd

dicemaster's Introduction

DiceMaster

Version Open Source Made with Python Love Smyles

Copyright (C) 2023 - Luis Miguel Isea.

DiceMaster is a Python project that can be used for rolling any number of dice of any number of faces. It is also my first Python project by the way.

The amazing thing about this project is that it has a basic menu, allowing the user to read the instructions as many times as desired. Also DiceMaster can do as many rollings as the user wants without having to reinitialize or exit the program.

Python 3 Compatibility: 3.7 3.8 3.9 3.10.

HOW TO RUN?

It's really easy: first, clone the repository, then make sure the sshkeyboard library is installed and, finally, run run.py.

Step 1: Clone the dicemaster repository

Open a terminal in the directory where you want to install the program and then clone this repository by typing this command:

git clone https://github.com/lmisea/dicemaster.git

Step 2: Install the requirements

A third-party Python library called sshkeyboard under the MIT License is required for running DiceMaster. Note: For Python 3.7 it is also required typing_extensions, that is why it is on requirements.txt.

GitHub Repository of the third-party Library: Sshkeyboard-Repository.

How to install the requirements? Make sure the terminal is open in the directory where the repository was clone and the execute this command in the terminal:

pip3 install -r requirements.txt

This will install the exact same library version I used for my project and therefore there will not be any issue.

Step 3: Run the DiceMaster program with python 3

Make sure the terminal is open in the directory where the repository was clone and run run.py with Python 3:

python3 run.py

HOW TO ROLL?

You can now roll any kind of die you want, as many times as you desire.

The standard syntax for rolling is: [num_dice]d[num_faces]+/-[modifier].

Where [num_dice] is an integer who specifies how many dice to roll.

And [num_faces] is an integer who specifies how many faces each die has.

For example:

If you write 2d6, this will roll 2 dice of 6 faces.

If you write 100 d 20, this will roll 100 dice of 20 faces.

Note that is okay to add a space before and/or after the d.

HOW TO ADD A MODIFIER?

After [num_faces] add: +/-[modifier]. Where [modifier] is an integer.

For a bonus modifier use +[modifier] and use -[modifier] for a penalty modifier. This will increase or decrease the total sum of the dice rolled by the [modifier] value.

For example:

If you write 1d8+2, this will roll 1 die of 8 adding a modifier of +2.

If you write 8d12 - 5, this will roll 8 dice of 12 faces adding a modifier of -5.

Note that it is okay to add a space before and/or after the + or -.

LICENSE

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

dicemaster's People

Contributors

lmisea avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.