summaryrefslogtreecommitdiff
path: root/src/card/player.rs
blob: 1439258afc6daa0bd91c428d3d27384937c26890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#[allow(non_camel_case_types)]
#[allow(dead_code)]
#[derive(Copy,Clone)]
pub enum PlayerId {
    NONE,
    PLAYER_1,
    PLAYER_2,
}

impl Default for PlayerId {
    fn default() -> Self {
        PlayerId::NONE
    }
}

impl core::fmt::Debug for PlayerId {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        match *self {
            PlayerId::NONE => {
                write!(f, "PlayerId::NONE    ")
            },
            PlayerId::PLAYER_1 => {
                write!(f, "PlayerId::PLAYER_1")
            },
            PlayerId::PLAYER_2 => {
                write!(f, "PlayerId::PLAYER_2")
            },
        }
    }
}