feat: implement roll for Die

This commit is contained in:
2025-11-16 08:23:29 +01:00
parent 201cafe329
commit a6c44bce22
5 changed files with 152 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
use crate::*;
impl Die {
pub fn roll(&self) -> u16 {
let mut rng = rand::rng();
rng.random_range(1..=self.sides)
}
}