From 9572af0b8173ada042e654dc0c7c342d58eefc92 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Sun, 24 Mar 2024 05:46:03 +0100 Subject: chore: change factions to purple/yellow --- src/shared/faction.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/shared/faction.rs') diff --git a/src/shared/faction.rs b/src/shared/faction.rs index 7719a0f..2f7ac33 100644 --- a/src/shared/faction.rs +++ b/src/shared/faction.rs @@ -3,15 +3,15 @@ use std::str::FromStr; #[derive(Component, Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)] pub enum Faction { - Red, - Blue, + Purple, + Yellow, } impl Faction { pub fn to_color(self) -> Color { match self { - Faction::Red => Color::RED, - Faction::Blue => Color::BLUE, + Faction::Purple => Color::PURPLE, + Faction::Yellow => Color::YELLOW, } } } @@ -21,8 +21,8 @@ impl FromStr for Faction { fn from_str(s: &str) -> Result { match s { - "red" => Ok(Faction::Red), - "blue" => Ok(Faction::Blue), + "purple" => Ok(Faction::Purple), + "yellow" => Ok(Faction::Yellow), _ => Err(format!("unknown faction: {}", s)), } } @@ -30,6 +30,6 @@ impl FromStr for Faction { impl Default for Faction { fn default() -> Self { - Faction::Blue + Faction::Yellow } } -- cgit v1.2.3