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
fn shuffle(&mut self)
Shuffle the cards into a random order
fn sort_suit_ascending_rank(&mut self)
Sort the cards by suit and then by rank (low to high)
fn sort_suit_descending_rank(&mut self)
Sorts the cards by suit and then by rank (high to low)
fn sort_descending_rank_suit(&mut self)
Sort the cards by rank (high to low) and then by suit