feat(engine): add resources, events, and GamePlugin event routing

Introduces the plumbing layer for Phase 3: GameStateResource wraps
solitaire_core::GameState, DragState tracks in-progress drags, and
SyncStatusResource holds runtime sync status. GamePlugin routes
Draw/Move/Undo/NewGame request events into GameState and emits
StateChangedEvent and GameWonEvent for downstream systems.

Also adds the Phase 3 implementation plan under docs/superpowers/plans/.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-04-23 16:15:38 -07:00
parent 3831fe691c
commit c393eab17d
8 changed files with 530 additions and 3 deletions
+16 -3
View File
@@ -1,3 +1,16 @@
// Bevy plugins are added in Phase 3.
// This crate will expose: CardPlugin, TablePlugin, AnimationPlugin,
// AudioPlugin, UIPlugin, AchievementPlugin, SyncPlugin, GamePlugin.
//! Bevy integration layer for Solitaire Quest.
//!
//! Currently exposes `GamePlugin` plus the resources and events it owns.
//! Additional plugins (`TablePlugin`, `CardPlugin`, `InputPlugin`,
//! `AnimationPlugin`, etc.) land in later sub-phases of Phase 3.
pub mod events;
pub mod game_plugin;
pub mod resources;
pub use events::{
CardFlippedEvent, DrawRequestEvent, GameWonEvent, MoveRequestEvent, NewGameRequestEvent,
StateChangedEvent, UndoRequestEvent,
};
pub use game_plugin::GamePlugin;
pub use resources::{DragState, GameStateResource, SyncStatus, SyncStatusResource};