Skip to main content

Module card

Module card 

Source
Expand description

Cards and card sets. A Card is one of the 52 cards of a standard deck; a CardSet is a set of cards packed into a bitmask for fast membership and removal checks.

Structs§

Card
One of the 52 cards, stored as its index rank * 4 + suit.
CardSet
A set of cards, packed as a 52-bit mask (bit card.index() per card).

Enums§

CardParseError
Why a card string could not be parsed; each variant carries the input.

Constants§

RANKS
Rank characters, low to high: 2..=9, T, J, Q, K, A.
SUITS
Suit characters: clubs, diamonds, hearts, spades.