#dice #RPG #game #gaming #roller

cute-dnd-dice

Simple library to roll dices

4 stable releases

✓ Uses Rust 2018 edition

2.1.0 Jul 1, 2019
2.0.0 Nov 11, 2018
1.0.1 Nov 11, 2018

#24 in Games

26 downloads per month

Apache-2.0

9KB
178 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

~433KB