Tabletop RPG Dice roller
Project description
Tabletop RPG Dice rolling manager.
This library uses system random generator in order to have truely random dice rolls.
Example
>>> from dicetray import Dicetray
>>> Dicetray('1d20 + 3').roll()
15
>>> Dicetray('4d6dl').roll()
10
>>> Dicetray('4d6kh3').roll()
12
>>> d = Dicetray('2d20kh + 1d4 + 3')
>>> d.result
>>> d.dice
set()
>>> d.roll()
18
>>> d.dice
{<Dice (d20): 14>, <Dice (d20): 14>, <Dice (d4): 1>}
>>> d.result
18
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dicetray-1.1.0.tar.gz
(3.6 kB
view hashes)