diff --git a/src/play.rs b/src/play.rs index c01a96f..9288897 100644 --- a/src/play.rs +++ b/src/play.rs @@ -1,18 +1,36 @@ use bevy::prelude::*; -use crate::deck::Card; +use crate::{deck::Card, GameState}; pub struct PlayPlugin; impl Plugin for PlayPlugin { fn build(&self, app: &mut App) { - app.add_systems(Update, rotate_cards); + app.add_systems(OnEnter(GameState::Play), serve_cards) + .add_systems(Update, rotate_cards); } } +/// Marker for cards which the player has selected #[derive(Component)] pub(crate) struct Selected; +/// Where in the deck a card is +#[derive(Component)] +pub(crate) struct DeckOrder(pub u8); + +/// Where on the board/table/play-space a card is +#[derive(Component)] +pub(crate) struct PlayLocation { + pub x: u8, + pub y: u8, +} + +/// Which captured set a card is associated with +#[derive(Component)] +pub(crate) struct SetNumber(pub u8); + +/// Debug system rotating selected cards for visual flare fn rotate_cards(mut query: Query<&mut Transform, (With, With)>, time: Res