diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-24 05:46:03 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-24 05:46:03 +0100 |
commit | 9572af0b8173ada042e654dc0c7c342d58eefc92 (patch) | |
tree | a33837263a6985e9b0e9b94f5aaab907d7aa1612 /src/shared | |
parent | 3bfcf00baeb7c0a2e1b45aa9038c80dc24e37214 (diff) |
chore: change factions to purple/yellow
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/faction.rs | 14 |
1 files changed, 7 insertions, 7 deletions
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<Faction, String> { 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 } } |