add stats accessors
This commit is contained in:
+15
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user