Trait deckofcards::Cards [] [src]

pub trait Cards {
    fn cards(&self) -> &[Card];
    fn mut_cards(&mut self) -> &mut [Card];

    fn shuffle(&mut self) { ... }
    fn sort_suit_ascending_rank(&mut self) { ... }
    fn sort_suit_descending_rank(&mut self) { ... }
    fn sort_descending_rank_suit(&mut self) { ... }
}

Certain actions are common to a deck and a hand of cards

Required Methods

Provided Methods

Shuffle the cards into a random order

Sort the cards by suit and then by rank (low to high)

Sorts the cards by suit and then by rank (high to low)

Sort the cards by rank (high to low) and then by suit

Implementors