15 lines
287 B
Rust
15 lines
287 B
Rust
use crate::*;
|
|
|
|
impl Handful {
|
|
pub fn roll(self) -> Outcome {
|
|
let mut die_rolls = Vec::<u16>::new();
|
|
for die in self.dice {
|
|
die_rolls.push(die.roll());
|
|
}
|
|
Outcome::List(die_rolls)
|
|
}
|
|
}
|
|
|
|
// #[cfg(test)]
|
|
// mod unit_tests { use super::*; }
|