buckshot_roulette_gameplay_engine/
multiplayer_count.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::fmt::Display;

#[derive(Debug, Clone, Copy, PartialEq)]
pub enum MultiplayerCount {
    Two = 2,
    Three = 3,
    Four = 4,
}

impl Display for MultiplayerCount {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let str = match self {
            MultiplayerCount::Four => "4",
            MultiplayerCount::Two => "2",
            MultiplayerCount::Three => "3",
        };
        write!(f, "{}", str)
    }
}