#dice #RPG #game #gaming #roller

cute-dnd-dice

Simple library to roll dices

3 stable releases

2.0.0 Nov 11, 2018
1.0.1 Nov 11, 2018

#33 in Games

Download history 4/week @ 2018-12-31 9/week @ 2019-01-07 9/week @ 2019-01-14 2/week @ 2019-01-21 6/week @ 2019-01-28 1/week @ 2019-02-04 1/week @ 2019-02-11 2/week @ 2019-02-18 3/week @ 2019-02-25 6/week @ 2019-03-04 2/week @ 2019-03-11 5/week @ 2019-03-18 13/week @ 2019-03-25 3/week @ 2019-04-01 2/week @ 2019-04-08

53 downloads per month

Apache-2.0

9KB
180 lines

cute-dnd-dice

Build Crates.io Documentation

Simple library to roll dices

Available features

  • std - Enables std support. Enabled by default.

Usage

extern crate cute_dnd_dice;

use cute_dnd_dice::Roll;

fn main() {
    let roll = Roll::from_str("2d20+10").expect("To parse roll");
    println!("I roll {}", roll.roll());
}

lib.rs:

Simple library to roll dices

Note

All ops are saturating.

Available features

  • std - Enables std support. Enabled by default.

Usage

extern crate cute_dnd_dice;

use cute_dnd_dice::Roll;

fn main() {
    let roll = Roll::from_str("2d20+10").expect("To parse roll");
    println!("I roll {}", roll.roll());
}

Dependencies

~1MB