roll

Function roll 

Source
pub fn roll(amount: u32, faces: NonZeroU32) -> Vec<u32>
Expand description

Roll the Dice and return results of the Roll for each Die.

ยงExamples

Roll 3d6 3 six-sided die and get sum of the results


let rolled = roll(3, NonZeroU32::new(6).unwrap() );
let sum: u32 = rolled.iter().sum();

assert!(sum > 2 && sum < 19)