6 releases
0.2.3 | Oct 2, 2022 |
---|---|
0.2.2 | Sep 16, 2022 |
0.2.1 | May 18, 2022 |
0.1.1 | May 18, 2022 |
#2297 in Algorithms
28KB
305 lines
genesys-dice-roller
A simple Rust library for taking a Genesys dice string as input and calculating a result.
Usage
use dice_roller::dice::{Dice, RollType};
use std::str::FromStr;
let dice = Dice::from_str("2p2g1y")?;
// Roll dice uses thread RNG
let result = dice.roll_dice();
Example input
2p2g1y
Dependencies
~1.3–2MB
~41K SLoC