dice-rs
A library for rolling dice.
Installation
Add this to your Cargo.toml
[]
= "0.1"
Usage
Roll 3d6 (3 six-sided die) and get the sum of the results
use roll_dice::roll;
let rolled = roll(3, 6);
let sum: u32 = rolled.iter().sum();
A library for rolling dice.
Add this to your Cargo.toml
[]
= "0.1"
Roll 3d6 (3 six-sided die) and get the sum of the results
use roll_dice::roll;
let rolled = roll(3, 6);
let sum: u32 = rolled.iter().sum();