feat: implement 'grab' for Handful

This commit is contained in:
2025-11-16 08:11:43 +01:00
parent 11a6f4c592
commit 00b0463465
2 changed files with 9 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
use crate::*;
impl Handful {
pub fn grab(dice: u16, sides: u16) -> Self {
todo!()
pub fn grab(dice_num: u16, sides: u16) -> Self {
let mut dice = Vec::<Die>::new();
for _ in 1..=dice_num {
dice.push(Die::new(sides));
}
Self { dice }
}
}