From c6b4c64067cc25b7fa760230811a92e418a4abe3 Mon Sep 17 00:00:00 2001 From: CoCo_Sol Date: Sun, 31 Mar 2024 17:57:30 +0200 Subject: [PATCH] save --- crates/border-wars/src/lib.rs | 3 +++ crates/border-wars/src/map/ownership.rs | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 crates/border-wars/src/map/ownership.rs diff --git a/crates/border-wars/src/lib.rs b/crates/border-wars/src/lib.rs index 6f144ae..808e0d2 100644 --- a/crates/border-wars/src/lib.rs +++ b/crates/border-wars/src/lib.rs @@ -36,4 +36,7 @@ pub struct Player { /// The uuid of the player. pub uuid: Uuid, + + /// The color of the player. + pub color: (u8, u8, u8), } diff --git a/crates/border-wars/src/map/ownership.rs b/crates/border-wars/src/map/ownership.rs new file mode 100644 index 0000000..56dbe34 --- /dev/null +++ b/crates/border-wars/src/map/ownership.rs @@ -0,0 +1,9 @@ +//! All code related to the ownership of the tiles. + +use bevy::prelude::*; + +use crate::Player; + +/// The owner of a tile. +#[derive(Component, Clone)] +pub struct Owner(pub Player);