Merge pull request 'feat(engine): surface upstream move-type counters and replay seek' (#173) from feat/upstream-stat-counters into master
This commit was merged in pull request #173.
This commit is contained in:
@@ -490,6 +490,32 @@ impl GameState {
|
||||
self.session.stats().stats().recycle_count()
|
||||
}
|
||||
|
||||
/// Number of cards moved onto foundations this game, read from the
|
||||
/// upstream session stats. Cumulative like [`Self::recycle_count`] —
|
||||
/// not rolled back on undo.
|
||||
pub fn move_to_foundation_count(&self) -> u32 {
|
||||
self.session.stats().stats().move_to_foundation_count()
|
||||
}
|
||||
|
||||
/// Number of stacks moved onto tableaus (from stock or another tableau)
|
||||
/// this game, read from the upstream session stats. Cumulative — not
|
||||
/// rolled back on undo.
|
||||
pub fn move_to_tableau_count(&self) -> u32 {
|
||||
self.session.stats().stats().move_to_tableau_count()
|
||||
}
|
||||
|
||||
/// Number of cards taken back off a foundation this game, read from the
|
||||
/// upstream session stats. Cumulative — not rolled back on undo.
|
||||
pub fn move_from_foundation_count(&self) -> u32 {
|
||||
self.session.stats().stats().move_from_foundation_count()
|
||||
}
|
||||
|
||||
/// Number of face-down cards revealed (flipped up) this game, read from
|
||||
/// the upstream session stats. Cumulative — not rolled back on undo.
|
||||
pub fn flip_up_count(&self) -> u32 {
|
||||
self.session.stats().stats().flip_up_bonus_count()
|
||||
}
|
||||
|
||||
/// Total moves made this game (draws, recycles, and card moves), derived
|
||||
/// from the session's instruction history length.
|
||||
pub fn move_count(&self) -> u32 {
|
||||
|
||||
Reference in New Issue
Block a user