#dice #dice-rolling #dice-roller #string #roll #random #genesys

genesys-dice-roller

A simple dice rolling library for genesys dice strings

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

#1981 in Algorithms

MIT license

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.4–2.1MB
~42K SLoC