feat: implement roll for Die
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
use crate::*;
|
||||
|
||||
impl Die {
|
||||
pub fn roll(&self) -> u16 {
|
||||
let mut rng = rand::rng();
|
||||
rng.random_range(1..=self.sides)
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
pub mod die_new;
|
||||
pub mod die_roll;
|
||||
pub mod handful_grab;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use rand::*;
|
||||
use std::*;
|
||||
|
||||
mod fun;
|
||||
|
||||
Reference in New Issue
Block a user