Crates.io | genesys-dice-roller |
lib.rs | genesys-dice-roller |
version | 0.2.3 |
source | src |
created_at | 2022-05-17 22:35:21.021563 |
updated_at | 2022-10-02 13:10:08.869103 |
description | A simple dice rolling library for genesys dice strings |
homepage | |
repository | https://github.com/arranf/genesys-dice-roller |
max_upload_size | |
id | 588639 |
size | 28,333 |
A simple Rust library for taking a Genesys dice string as input and calculating a result.
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();
2p2g1y