diff --git a/src/card.rs b/src/card.rs index db78b16..354292a 100644 --- a/src/card.rs +++ b/src/card.rs @@ -1,5 +1,7 @@ //! TODO: module doc :v +use bevy::ecs::component::Component; + /// Value for the "sub tiles" inside a room tile #[derive(Clone, Copy, Debug, Default, PartialEq)] pub enum Cell { @@ -47,7 +49,7 @@ pub enum RotationDir { /// An invidiual room, or "card" in the player's hand. The room may /// *or may not* be valid, yet. -#[derive(Clone, Copy, Debug, Default, PartialEq)] +#[derive(Clone, Copy, Component, Debug, Default, PartialEq)] pub struct Card { cells: [Cell; 9], nw: bool, diff --git a/src/game/mod.rs b/src/game/mod.rs index 41e8717..159a5b7 100644 --- a/src/game/mod.rs +++ b/src/game/mod.rs @@ -1,4 +1,3 @@ - use bevy::prelude::*; /// Data component for info about the player's current set of cards. @@ -7,9 +6,9 @@ use bevy::prelude::*; /// /// [`Self::low_water_mark`] is the threshold for drawing new cards on-room-enter. #[derive(Component)] -pub struct PlayerHand{ +pub struct PlayerHand { cards: Vec, - capacity: u8, + capacity: u8, low_water_mark: u8, } @@ -35,4 +34,4 @@ pub mod consumables { #[derive(Component)] pub struct Fuel(u32); -} \ No newline at end of file +}