#dice #RPG #game #gaming #roller

cute-dnd-dice

Simple library to roll dices

2 stable releases

1.0.1 Nov 11, 2018

#68 in Games

Download history 28/week @ 2018-11-11 41/week @ 2018-11-18 28/week @ 2018-11-25 16/week @ 2018-12-02 15/week @ 2018-12-09

5 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