HandInterface - lcrocker/ojpoker GitHub Wiki
HandInterface
There is one interface (HandInterface
in Dart and HandTrait
in Rust)
with two implementing classes: Hand
and OrphanHand
(both languages).
An OrphanHand is simply a list of cards, with some useful methods for
manipulating them.
A Hand is such a list with an associated Deck. These should be used in
preference to OrphanHand
when possible, since the offer more error checking
and many convenience functions.
Either hand type can be used to implement player hands, discard piles, Texas Hold'em boards, active tricks, solitaire tableaux, etc.