diff options
Diffstat (limited to 'src/shared/faction.rs')
-rw-r--r-- | src/shared/faction.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/shared/faction.rs b/src/shared/faction.rs new file mode 100644 index 0000000..4ff4a02 --- /dev/null +++ b/src/shared/faction.rs @@ -0,0 +1,16 @@ +use crate::shared::*; + +#[derive(Component, Clone, Copy, PartialEq, Eq)] +pub enum Faction { + Red, + Blue, +} + +impl Faction { + pub fn to_color(self) -> Color { + match self { + Faction::Red => Color::RED, + Faction::Blue => Color::BLUE, + } + } +} |