aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/faction.rs
blob: 4ff4a0275ef21efb5ff2f44572375b3ba924126b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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,
        }
    }
}