add stats accessors

This commit is contained in:
2026-05-29 13:15:32 -07:00
parent 1d96eec147
commit cd7f025708
+15 -3
View File
@@ -78,12 +78,24 @@ impl KlondikeStats {
+ self.move_from_foundation_count as i32 * config.move_from_foundation + self.move_from_foundation_count as i32 * config.move_from_foundation
+ self.recycle_count as i32 * config.recycle + self.recycle_count as i32 * config.recycle
} }
pub const fn recycle_count(&self) -> u32 {
self.recycle_count
}
pub const fn moves(&self) -> u32 { pub const fn moves(&self) -> u32 {
self.moves 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. /// A card was moved to a foundation.
const fn increment_move_to_foundation(&mut self) { const fn increment_move_to_foundation(&mut self) {
self.move_to_foundation_count += 1; self.move_to_foundation_count += 1;