buckshot_roulette_gameplay_engine/
round_number.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, Eq, Hash)]
pub enum RoundNumber {
    One = 1,
    Two = 2,
    Three = 3,
}

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