feat: add method roll to Handful

This commit is contained in:
2025-11-16 08:31:33 +01:00
parent a6c44bce22
commit 0eddb019dd
3 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
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::*; }

View File

@@ -1,3 +1,4 @@
pub mod die_new;
pub mod die_roll;
pub mod handful_grab;
pub mod handful_roll;