Function rouler::roll_dice
[−]
[src]
pub fn roll_dice(r: &str) -> i64
A simple function for throwaway die rolls that do not need saved as a
Roller
. Provided for convenience.
Takes an input of a &str
containing syntax for a die roll, returns total.
Panics
As roll_dice
parses its argument, it will thus panic if the given syntax is incorrect.
Examples
use rouler::roll_dice; println!("Wizard HP at lvl 9: {}", roll_dice("6d6+6"));