modes:pair: document that Pair::1 is always a playing card in Pair::new

This commit is contained in:
2026-04-02 06:16:12 +01:00
committed by oreodave
parent 0267a6f567
commit 0328a828c8

View File

@@ -9,7 +9,8 @@ impl Pair {
if a Pair cannot be constructed out of the two cards. if a Pair cannot be constructed out of the two cards.
NOTE: By construction, if the Pair includes a Joker, that Joker will be the NOTE: By construction, if the Pair includes a Joker, that Joker will be the
first member of the pair. first member of the pair. In other words, Pair::1 will always be a valid
playing card.
*/ */
fn new(c1: Card, c2: Card) -> Option<Pair> { fn new(c1: Card, c2: Card) -> Option<Pair> {
// Order the cards. This means if xor(c1 is joker, c2 is joker) c1 will // Order the cards. This means if xor(c1 is joker, c2 is joker) c1 will