pub type U32Card = u32;Expand description
A U32Card is a u32 type alias of a variant of Cactus Kev’s binary
representation of a poker card as designed for rapid hand evaluation as
documented here.
The variation being that the Suit bits order is inverted for easier sorting.
+--------+--------+--------+--------+
|xxxbbbbb|bbbbbbbb|SHDCrrrr|xxpppppp|
+--------+--------+--------+--------+
p = prime number of rank (deuce=2,trey=3,four=5,...,ace=41)
r = rank of card (deuce=0,trey=1,four=2,five=3,...,ace=12)
SHDC = suit of card (bit turned on based on suit of card)
b = bit turned on depending on rank of card