Crate deckofcards [−] [src]
Structs
Card |
A playing card has a suit and a rank |
Deck |
This represents a deck of zero or more cards. Internally the deck consists of an undealt and a dealt pile of cards. The undealt pile starts off empty and receives cards as they are dealt from the undealt pile. The deck may be reset to return it to its original state. A deck may be shuffled to randomize its order. |
Hand |
A hand is zero or more cards that represents some aspect of a game, e.g. the cards a person is holding. A hand may be shuffled or sorted and there are functions for adding or removing cards. Unlike a Deck, there is no concept of dealt or undealt cards. |
Enums
Rank |
Standard card ranks |
Suit |
Standard card suits |
Traits
Cards |
Certain actions are common to a deck and a hand of cards |