https://github.com/onlyhavecans/randomroller
A die roller that uses a TrueRNG device directly to generate randoms
https://github.com/onlyhavecans/randomroller
dice hardware random roll
Last synced: 5 months ago
JSON representation
A die roller that uses a TrueRNG device directly to generate randoms
- Host: GitHub
- URL: https://github.com/onlyhavecans/randomroller
- Owner: onlyhavecans
- License: other
- Created: 2017-05-10T06:39:20.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2025-09-02T07:34:07.000Z (10 months ago)
- Last Synced: 2025-09-03T11:51:44.868Z (10 months ago)
- Topics: dice, hardware, random, roll
- Language: Python
- Homepage:
- Size: 77.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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)
```python
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