Crate cute_dnd_dice

source ·
Expand description

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());
}

Re-exports

pub extern crate rand;

Structs

D&D Roll representation

Enums

Roll Modifier
Possible errors when parsing roll