#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

#14 in Games

Download history 43/week @ 2018-11-07 36/week @ 2018-11-14 21/week @ 2018-11-21 16/week @ 2018-11-28 15/week @ 2018-12-05 7/week @ 2018-12-12 33/week @ 2018-12-19 2/week @ 2018-12-26 6/week @ 2019-01-02 9/week @ 2019-01-09 7/week @ 2019-01-16

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