use core::fmt::{Display, Formatter, Result};

#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum Rank {
    Seven,
    Eight,
    Nine,
    Ten,
    Under,
    Over,
    King,
    Ace,
}

impl Display for Rank {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        match self {
            Rank::Seven => write!(f, "7"),
            Rank::Eight => write!(f, "8"),
            Rank::Nine => write!(f, "9"),
            Rank::Ten => write!(f, "10"),
            Rank::Under => write!(f, "under"),
            Rank::Over => write!(f, "over"),
            Rank::King => write!(f, "king"),
            Rank::Ace => write!(f, "ace"),
        }
    }
}
