diff --git a/solitaire_app/src/lib.rs b/solitaire_app/src/lib.rs index 3d84350..10b9a66 100644 --- a/solitaire_app/src/lib.rs +++ b/solitaire_app/src/lib.rs @@ -37,11 +37,6 @@ fn load_settings() -> Settings { .unwrap_or_default() } -/// Build the Bevy app without entering the event loop. -pub fn build_app(sync_provider: Box) -> App { - build_app_with_settings(load_settings(), sync_provider) -} - /// App entry point — configures runtime services, builds, and runs the app. /// /// Called from both the desktop `bin` target's `main` shim and (on diff --git a/solitaire_core/src/lib.rs b/solitaire_core/src/lib.rs index ec35564..8000091 100644 --- a/solitaire_core/src/lib.rs +++ b/solitaire_core/src/lib.rs @@ -13,7 +13,7 @@ pub mod spider; // re-exported — they are only used internally (in `klondike_adapter.rs` and // when decoding instructions to piles in `instruction_to_piles`) and do not // appear in any public method signature. -pub use card_game::{Card, Deck, Rank, Session, SolveError, Suit}; +pub use card_game::{Card, Deck, Rank, SolveError, Suit}; pub use klondike::{ DrawStockConfig, Foundation, Klondike, KlondikeInstruction, KlondikePile, Tableau, }; diff --git a/solitaire_data/src/lib.rs b/solitaire_data/src/lib.rs index b5f1b94..9dcddc6 100644 --- a/solitaire_data/src/lib.rs +++ b/solitaire_data/src/lib.rs @@ -105,10 +105,9 @@ pub use stats::{StatsExt, StatsSnapshot}; pub mod storage; pub use storage::{ TimeAttackSession, cleanup_orphaned_tmp_files, delete_game_state_at, - delete_time_attack_session_at, game_state_file_path, load_game_state_from, load_stats, - load_stats_from, load_time_attack_session_from, load_time_attack_session_from_at, - save_game_state_to, save_stats, save_stats_to, save_time_attack_session_to, stats_file_path, - time_attack_session_path, time_attack_session_with_now, + delete_time_attack_session_at, game_state_file_path, load_game_state_from, load_stats_from, + load_time_attack_session_from, save_game_state_to, save_stats_to, save_time_attack_session_to, + stats_file_path, time_attack_session_path, }; pub mod achievements; @@ -136,11 +135,9 @@ pub use difficulty_seeds::{DifficultySeeds, seeds_for}; pub mod settings; pub use settings::{ - AnimSpeed, REPLAY_MOVE_INTERVAL_MAX_SECS, REPLAY_MOVE_INTERVAL_MIN_SECS, - REPLAY_MOVE_INTERVAL_STEP_SECS, SOLVER_DEAL_RETRY_CAP, Settings, SyncBackend, - TIME_BONUS_MULTIPLIER_MAX, TIME_BONUS_MULTIPLIER_MIN, TIME_BONUS_MULTIPLIER_STEP, - TOOLTIP_DELAY_MAX_SECS, TOOLTIP_DELAY_MIN_SECS, TOOLTIP_DELAY_STEP_SECS, Theme, WindowGeometry, - load_settings_from, save_settings_to, settings_file_path, + AnimSpeed, REPLAY_MOVE_INTERVAL_STEP_SECS, SOLVER_DEAL_RETRY_CAP, Settings, SyncBackend, + TIME_BONUS_MULTIPLIER_STEP, TOOLTIP_DELAY_STEP_SECS, Theme, WindowGeometry, load_settings_from, + save_settings_to, settings_file_path, }; #[cfg(target_os = "android")] @@ -152,9 +149,7 @@ mod android_keystore; #[cfg(not(target_arch = "wasm32"))] pub mod auth_tokens; #[cfg(not(target_arch = "wasm32"))] -pub use auth_tokens::{ - TokenError, delete_tokens, load_access_token, load_refresh_token, store_tokens, -}; +pub use auth_tokens::{TokenError, delete_tokens, store_tokens}; pub mod sync_client; pub use sync_client::LocalOnlyProvider; diff --git a/solitaire_data/src/storage.rs b/solitaire_data/src/storage.rs index 4562cc6..294ab3a 100644 --- a/solitaire_data/src/storage.rs +++ b/solitaire_data/src/storage.rs @@ -46,22 +46,6 @@ pub fn save_stats_to(path: &Path, stats: &StatsSnapshot) -> io::Result<()> { Ok(()) } -/// Load stats from the platform default path. Returns default if the path -/// is unavailable or the file is missing/corrupt. -pub fn load_stats() -> StatsSnapshot { - stats_file_path() - .map(|p| load_stats_from(&p)) - .unwrap_or_default() -} - -/// Save stats to the platform default path. Returns an error if the platform -/// data dir is unavailable or the write fails. -pub fn save_stats(stats: &StatsSnapshot) -> io::Result<()> { - let path = stats_file_path() - .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "platform data dir unavailable"))?; - save_stats_to(&path, stats) -} - // --------------------------------------------------------------------------- // In-progress game state // --------------------------------------------------------------------------- @@ -245,18 +229,6 @@ pub fn delete_time_attack_session_at(path: &Path) -> io::Result<()> { } } -/// Convenience helper for callers that want to stamp a session with the -/// current wall-clock time. Equivalent to constructing the struct -/// manually and setting `saved_at_unix_secs` to `SystemTime::now()`. -pub fn time_attack_session_with_now(remaining_secs: f32, wins: u32) -> TimeAttackSession { - let now = Utc::now().timestamp().max(0) as u64; - TimeAttackSession { - remaining_secs, - wins, - saved_at_unix_secs: now, - } -} - /// Inner helper: delete `*.tmp` entries inside `dir`. /// /// Per-file errors (already deleted, permission denied) are silently ignored. diff --git a/solitaire_engine/src/animation_plugin.rs b/solitaire_engine/src/animation_plugin.rs index eb31866..d57e131 100644 --- a/solitaire_engine/src/animation_plugin.rs +++ b/solitaire_engine/src/animation_plugin.rs @@ -252,10 +252,17 @@ fn advance_card_anims( time: Res