pub fn roll_dice(r: &str) -> i64
Expand description

A simple function for throwaway die rolls that do not need to be 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"));