A die roller that uses a TrueRNG device directly to generate randoms
Reviewed-on: #4 Co-authored-by: Renovate Bot <renovate@onlyhavecans.works> Co-committed-by: Renovate Bot <renovate@onlyhavecans.works> |
||
|---|---|---|
| randomroller | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| LICENCE | ||
| Makefile | ||
| MANIFEST.in | ||
| Pipfile | ||
| Pipfile.lock | ||
| README.md | ||
| renovate.json | ||
| setup.cfg | ||
| setup.py | ||
| versioneer.py | ||
Random Roller
A not very interesting die & dice rolling simulator. This is mostly so I can play with different of randoms
Requirements
Currently requires a TrueRNG device plugged into the machine
Library
in randomroller there is Die (a single die), and Dice (a group of die all with the same side)
from randomroller import Die
d = Die(100)
print(d.roll())
from randomroller import Dice
d2 = Dice(2, 20)
print(d2.roll())
print('Show me each die roll instead of the total: ', d2.rolls())
Cli
THis adds the rr command that takes two arguments
- dice count
- number of sides for the dice
ex: rr 1 6 rolls 1d6