angda 0.1.0

Last updated:

0 purchases

angda 0.1.0 Image
angda 0.1.0 Images
Add to Cart

Description:

angda 0.1.0

Angda
Angda (A Neat Generic Dice API) is a dice-rolling API created in Python by Stephen Malone.

See changes.md for a complete changelog.
See license.md for licensing information.

Installation

Install Python 3.7 or higher.
Run pip install angda.

Usage
Angda can be used on the command-line or imported as a Python library.
Command-Line
Run angda --help to see all available options.
$ angda 2d6+1
#1: 2d6+1 = 7.

$ angda 2d6+1 --quiet
7

$ angda 2d6+1 --details
Dice #1:
- String: 2d6+1.
- Fields: Dice=2, Size=6, Plus=1.
- Result: [4, 2] + 1 = 7.

Python Library
Use angda.roll for simple rolls, or the Dice class for more complex cases.
>>> import angda

>>> angda.roll('2d6+1')
7

>>> angda.roll('2d6+1', objects=True)
{'dice': Dice(2, 6, 1), 'roll': Roll(7, 1, [4, 2])}

>>> dice = angda.Dice(dice=4, size=6, plus=0)
>>> dice.roll()
Roll(7, 1, [4, 2])

Credits
Angda uses the following third-party libraries:

PyTest.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.