A die roller that uses a TrueRNG device directly to generate randoms
Find a file
Renovate Bot 6560bffc6e chore(deps): lock file maintenance (#4)
Reviewed-on: #4
Co-authored-by: Renovate Bot <renovate@onlyhavecans.works>
Co-committed-by: Renovate Bot <renovate@onlyhavecans.works>
2025-09-07 17:30:47 -07:00
randomroller Add versioneer 2018-04-18 19:07:31 -07:00
tests Optimizations in speed, test, & code 2017-05-11 19:19:48 -07:00
.gitattributes Add versioneer 2018-04-18 19:07:31 -07:00
.gitignore Clean up and add a d20 roll 2018-04-18 18:36:51 -07:00
LICENCE A Simple Die 2017-05-09 19:08:06 -07:00
Makefile deploy time! 2018-04-18 19:58:24 -07:00
MANIFEST.in Add versioneer 2018-04-18 19:07:31 -07:00
Pipfile deploy time! 2018-04-18 19:58:24 -07:00
Pipfile.lock chore(deps): lock file maintenance (#4) 2025-09-07 17:30:47 -07:00
README.md Fix docs 2018-04-18 19:40:07 -07:00
renovate.json Configure Renovate (#2) 2025-09-01 20:24:48 -07:00
setup.cfg Add versioneer 2018-04-18 19:07:31 -07:00
setup.py Fix setup requires and description 2018-04-18 20:02:11 -07:00
versioneer.py Add versioneer 2018-04-18 19:07:31 -07:00

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