From cd7f0257085fd4e3d7a62590851a274a56313a77 Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Fri, 29 May 2026 13:15:32 -0700 Subject: [PATCH] add stats accessors --- klondike/src/lib.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/klondike/src/lib.rs b/klondike/src/lib.rs index c066861..cd67dee 100644 --- a/klondike/src/lib.rs +++ b/klondike/src/lib.rs @@ -78,12 +78,24 @@ impl KlondikeStats { + self.move_from_foundation_count as i32 * config.move_from_foundation + self.recycle_count as i32 * config.recycle } - pub const fn recycle_count(&self) -> u32 { - self.recycle_count - } pub const fn moves(&self) -> u32 { self.moves } + pub const fn move_to_foundation_count(&self) -> u32 { + self.move_to_foundation_count + } + pub const fn flip_up_bonus_count(&self) -> u32 { + self.flip_up_bonus_count + } + pub const fn move_to_tableau_count(&self) -> u32 { + self.move_to_tableau_count + } + pub const fn move_from_foundation_count(&self) -> u32 { + self.move_from_foundation_count + } + pub const fn recycle_count(&self) -> u32 { + self.recycle_count + } /// A card was moved to a foundation. const fn increment_move_to_foundation(&mut self) { self.move_to_foundation_count += 1;