<commit_before>use std::fmt;

/// `Rank` is a type the represents the rank of a playing card.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Rank {
    Ace,
    Two,
    Three,
    Four,
    Five,
    Six,
    Seven,
    Eight,
    Nine,
    Ten,
    Jack,
    Queen,
    King,
}


/// `Suit` is a type the represents the suit of a playing card.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Suit {
    Hearts,
    Clubs,
    Diamonds,
    Spades,
}


/// `Card` is a struct that holds the [`Rank`] and [`Suit`] type of a playing card.
///
/// [`Rank`]: enum.Rank.html
/// [`Suit`]: enum.Suit.html
#[derive(Debug, PartialEq)]
pub struct Card {
    pub rank: Rank,
    pub suit: Suit,
}

impl Card {
    /// Constructs a new `Card`.
    ///
    /// # Examples
    ///
    /// ```
    /// use libterminal_cribbage::cards::{Card, Rank, Suit};
    ///
    /// let playing_card = Card::new(Rank::Ace, Suit::Spades);
    ///
    /// println!("Played card: {}", playing_card);
    /// ```<commit_msg>Stopping card member from being public.<commit_after>use std::fmt;

/// `Rank` is a type the represents the rank of a playing card.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Rank {
    Ace,
    Two,
    Three,
    Four,
    Five,
    Six,
    Seven,
    Eight,
    Nine,
    Ten,
    Jack,
    Queen,
    King,
}


/// `Suit` is a type the represents the suit of a playing card.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Suit {
    Hearts,
    Clubs,
    Diamonds,
    Spades,
}


/// `Card` is a struct that holds the [`Rank`] and [`Suit`] type of a playing card.
///
/// [`Rank`]: enum.Rank.html
/// [`Suit`]: enum.Suit.html
#[derive(Debug, PartialEq)]
pub struct Card {
    rank: Rank,
    suit: Suit,
}

impl Card {
    /// Constructs a new `Card`.
    ///
    /// # Examples
    ///
    /// ```
    /// use libterminal_cribbage::cards::{Card, Rank, Suit};
    ///
    /// let playing_card = Card::new(Rank::Ace, Suit::Spades);
    ///
    /// println!("Played card: {}", playing_card);
    /// ```
{'fraction_non_alphanumeric': 0.17690782953419226, 'fraction_numerical': 0.0, 'mean_word_length': 2.1497659906396254, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '64714', 'n_tokens_mistral': 707, 'n_tokens_neox': 718, 'n_words': 213}