genesys-dice-roller

Crates.iogenesys-dice-roller
lib.rsgenesys-dice-roller
version0.2.3
sourcesrc
created_at2022-05-17 22:35:21.021563
updated_at2022-10-02 13:10:08.869103
descriptionA simple dice rolling library for genesys dice strings
homepage
repositoryhttps://github.com/arranf/genesys-dice-roller
max_upload_size
id588639
size28,333
Arran France (arranf)

documentation

README

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
Commit count: 7

cargo fmt