feat: add 'new' method for Die struct

This commit is contained in:
2025-11-16 08:07:38 +01:00
parent a0f3d98fa2
commit 11a6f4c592
3 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
use crate::*;
impl Die {
pub fn new(sides: u16) -> Self {
Self { sides }
}
}
// #[cfg(test)]
// mod unit_tests { use super::*; }

View File

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

View File

@@ -1,7 +1,9 @@
use crate::*;
#[derive(Debug, Default, PartialEq, Clone)]
pub struct O {}
pub struct O {
pub(crate) sides: u16,
}
// impl std::fmt::Display for O {
// fn fmt(&self, _f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {