refactor(app): extract build_app(), add CoreGamePlugin placeholder (closes #42, closes #44)

- Split run() into build_app(sync_provider) -> App and run()
- Add empty CoreGamePlugin registered in build_app()
- Issue #43 closed via API (main.rs already satisfies it)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
funman300
2026-05-27 16:41:40 -07:00
parent 5a71e2bc0a
commit 3885b334ec
3 changed files with 48 additions and 16 deletions
+15
View File
@@ -0,0 +1,15 @@
//! Central plugin that groups all gameplay systems.
//!
//! Register [`CoreGamePlugin`] once in the app instead of the individual
//! plugins. Systems are added here rather than directly in the app entry point.
use bevy::prelude::*;
/// Groups all Ferrous Solitaire gameplay plugins.
pub struct CoreGamePlugin;
impl Plugin for CoreGamePlugin {
fn build(&self, _app: &mut App) {
// Gameplay systems will be migrated here in follow-up issues.
}
}
+3
View File
@@ -19,6 +19,7 @@ pub mod daily_challenge_plugin;
pub mod difficulty_plugin;
pub mod diagnostics_hud;
pub mod events;
pub mod core_game_plugin;
pub mod game_plugin;
pub mod help_plugin;
pub mod home_plugin;
@@ -66,6 +67,7 @@ pub use analytics_plugin::{AnalyticsPlugin, AnalyticsResource};
pub use challenge_plugin::{
challenge_progress_label, ChallengeAdvancedEvent, ChallengePlugin, CHALLENGE_UNLOCK_LEVEL,
};
pub use core_game_plugin::CoreGamePlugin;
pub use daily_challenge_plugin::{
DailyChallengeCompletedEvent, DailyChallengePlugin, DailyChallengeResource,
};
@@ -154,6 +156,7 @@ pub use stats_plugin::{
ReplayPrevButton, ReplaySelectorCaption, SelectedReplayIndex, StatsPlugin, StatsResource,
StatsScreen, StatsUpdate, WatchReplayButton,
};
pub use solitaire_data::SyncProvider;
pub use sync_plugin::{SyncPlugin, SyncProviderResource};
pub use sync_setup_plugin::SyncSetupPlugin;
pub use ui_focus::{Disabled, FocusGroup, Focusable, FocusedButton, UiFocusPlugin};