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.0.0.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file dicetray-1.0.0.tar.gz
.
File metadata
- Download URL: dicetray-1.0.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd400bf573a344d2c3a74502762fd40473bfdea45d8704a4eddfacf0d13d82c8 |
|
MD5 | 23cf9d19a515e3e450b07e9e9bf8df09 |
|
BLAKE2b-256 | cd605e98aff675bba75eec07acb8cf9af2788a140526283a6b6ed76c0b5f346b |
File details
Details for the file dicetray-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: dicetray-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15ef99826a586665590e61c52f22e9e885f13c9df9751a93b5f9391214e6a639 |
|
MD5 | 72949038ed14604e35cd3958921adaef |
|
BLAKE2b-256 | 4aefdef5a121bd1ca56b1b2626b3424955e94e8948ba950474a50bbbd29e1a97 |