Metadata-Version: 2.1
Name: hdroller
Version: 0.0.4
Summary: A package for computing dice probabilities
Home-page: https://gitlab.com/highdiceroller/hdroller
Author: Albert Julius Liu
Author-email: ajul1987+highdiceroller@gmail.com
License: UNKNOWN
Project-URL: Twitter, https://twitter.com/highdiceroller
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Games/Entertainment :: Role-Playing
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md

A library for computing dice probabilities.

## Basic objectives

* Dice are assumed to have integer faces and finite range.
* **Not** Monte-Carlo-based, though this does provide a sample() function.
* Computations are done using float64. I considered exact fractions but I didn't want to deal with the possibility of integer overflow. I might revisit this in the future.

## Example

```python
from hdroller import Die

# A standard d10.
die = Die.d10

# A d10, exploding on highest face at most twice, similar to Legend of the Five Rings.
die = Die.d10.explode(2)

# Roll ten L5R dice and keep the five highest.
die = Die.d10.explode(2).keep_highest(10, 5)

# Plot it.
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(die.outcomes(), die.pmf())
plt.show()
```


