From 655bc5d3e2f919869e340655c017745686d83a03 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Mon, 25 Aug 2025 18:55:38 -0500 Subject: [PATCH] Add new module for game bits --- src/game/mod.rs | 38 ++++++++++++++++++++++++++++++++++++++ src/main.rs | 1 + 2 files changed, 39 insertions(+) create mode 100644 src/game/mod.rs diff --git a/src/game/mod.rs b/src/game/mod.rs new file mode 100644 index 0000000..41e8717 --- /dev/null +++ b/src/game/mod.rs @@ -0,0 +1,38 @@ + +use bevy::prelude::*; + +/// Data component for info about the player's current set of cards. +/// +/// [`Self::capacity`] is the maximum hand size. +/// +/// [`Self::low_water_mark`] is the threshold for drawing new cards on-room-enter. +#[derive(Component)] +pub struct PlayerHand{ + cards: Vec, + capacity: u8, + low_water_mark: u8, +} + +pub mod machines { + + use bevy::prelude::*; + + #[derive(Component)] + pub struct CuttingMachine; + + #[derive(Component)] + pub struct RotatingMachine; + + #[derive(Component)] + pub struct FlippingMachine; + + #[derive(Component)] + pub struct TransposingMachine; +} + +pub mod consumables { + use bevy::prelude::*; + + #[derive(Component)] + pub struct Fuel(u32); +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 14c8c06..b33dc9d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,7 @@ use bevy_inspector_egui::{bevy_egui::EguiPlugin, quick::WorldInspectorPlugin}; mod assets; mod card; +mod game; mod resources; mod widgets;