aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/faction.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/faction.rs')
-rw-r--r--src/shared/faction.rs14
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
}
}