diff options
Diffstat (limited to 'src/card/player.rs')
| -rw-r--r-- | src/card/player.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/card/player.rs b/src/card/player.rs new file mode 100644 index 0000000..1439258 --- /dev/null +++ b/src/card/player.rs @@ -0,0 +1,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") + }, + } + } +} |
