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)
}
}

View File

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

View File

@@ -1,3 +1,4 @@
use rand::*;
use std::*;
mod fun;