Rolls some dice
make install
```bash
one-d-six -h
one-d-six 3d4 2d6 1d20
one-d-six --complex 2d20 1d12 ```
This is not complete usage documentation. This is the expected most common usage. ```rust use onedsix::{ quickroll, Dice, };
// Quickly generating a set of Dice and rolls them let coinflip: u8 = quickroll("1d2"); if coinflip == 1 { println!("Heads!"); } else { println!("Tails!"); }
// Creating sets of dice let set1 = Dice::new(2, 4); // Creates 2d4 with Dice::new let set2: Dice = "1d20".parse().unwrap(); // Creates 1d20 by parsing str
// Combining sets of dice let mut dice = set1 + set2; // Creates 2d4 + 1d20
// Prints 50 rolls of the dice set for _ in 0..50 { dice = dice.roll_all();
// Method 1
println!("2d4 + 1d20: {}", dice);
// Method 2
let total: u32 = dice.total();
println!("2d4 + 1d20: {}", total);
}
// Getting value of each die cast let _results = format!("{:?}", dice); ```