pub struct StatisticsManager { /* private fields */ }
Expand description
Statistics manager for tracking and analyzing game data
Implementations§
Source§impl StatisticsManager
impl StatisticsManager
Sourcepub fn new(stats_file: &str) -> GameResult<Self>
pub fn new(stats_file: &str) -> GameResult<Self>
Create a new statistics manager
Sourcepub fn record_session(&mut self, session: GameSessionStats) -> GameResult<()>
pub fn record_session(&mut self, session: GameSessionStats) -> GameResult<()>
Record a new game session
Sourcepub fn get_summary(&self) -> StatisticsSummary
pub fn get_summary(&self) -> StatisticsSummary
Get statistics summary
Sourcepub fn get_score_trend(&self, count: usize) -> Vec<(u32, u32)>
pub fn get_score_trend(&self, count: usize) -> Vec<(u32, u32)>
Get score trend data (last N games)
Sourcepub fn get_efficiency_trend(&self, count: usize) -> Vec<(u32, f64)>
pub fn get_efficiency_trend(&self, count: usize) -> Vec<(u32, f64)>
Get efficiency trend data (last N games)
Sourcepub fn get_tile_achievements(&self) -> Vec<(u32, u32)>
pub fn get_tile_achievements(&self) -> Vec<(u32, u32)>
Get tile achievement data
Sourcepub fn clear_statistics(&mut self) -> GameResult<()>
pub fn clear_statistics(&mut self) -> GameResult<()>
Clear all statistics
Sourcepub fn export_statistics(&self) -> GameResult<String>
pub fn export_statistics(&self) -> GameResult<String>
Export statistics to JSON
Auto Trait Implementations§
impl Freeze for StatisticsManager
impl RefUnwindSafe for StatisticsManager
impl Send for StatisticsManager
impl Sync for StatisticsManager
impl Unpin for StatisticsManager
impl UnwindSafe for StatisticsManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more