Evaluates the 5 - 7 card codes to arrive at a number representing the hand strength, smaller is better.
Number
:
the strength of the hand comprised by the card codes
Evaluates the 5 - 7 cards to arrive at a number representing the hand strength, smaller is better.
Number
:
the strength of the hand comprised by the cards
Same as evaluateCards
but skips cards
argument type check to be more
performant.
(any)
Evaluates the given board of 5 to 7 cards provided as part of the board to arrive at a number representing the hand strength, smaller is better.
Number
:
the strength of the hand comprised by the cards of the board
Evaluates the 5 - 7 cards and then calculates the hand rank.
Number
:
the rank of the hand comprised by the cards, i.e.
1
for
FOUR_OF_A_KIND
(enumerated in ranks)
Same as rankCards
but skips cards
argument type check to be more
performant.
(any)
Evaluates the 5 - 7 card codes and then calculates the hand rank.
Number
:
the rank of the hand comprised by the card codes, i.e.
1
for
FOUR_OF_A_KIND
(enumerated in ranks)
Evaluates the given board of 5 to 7 cards provided as part of the board to and then calculates the hand rank.
Number
:
the rank of the hand comprised by the cards, i.e.
1
for
FOUR_OF_A_KIND
(enumerated in ranks)
Converts a set of cards to card codes.
Set<Number>
:
card code set
Converts a set of card codes to their string representations.
Set<String>
:
set with string representations of the card codes,
i.e.
Set({'Ah', 'Ks', 'Td', '3c, 'Ad'})
Enumeration of possible hand ranks, each rank is a number from 0-8.
STRAIGHT_FLUSH
FOUR_OF_A_KIND
FULL_HOUSE
FLUSH
STRAIGHT
THREE_OF_A_KIND
TWO_PAIR
ONE_PAIR
HIGH_CARD
Provides a description of a hand rank number. It's an {Array} which can be indexed into with the hand rank in order to retrieve the matching description.
Example: rankDescription[rank.FULL_HOUSE] === 'Full House'
Converts a hand strength number into a hand rank number
0 - 8
for STRAIGHT_FLUSH - HIGH_CARD
.
Number
:
the hand rank
The ranks of the cards sorted highest to lowest.
6 bits each.
Object
:
the ranks indexed as described above
The suitCodes
Object
:
the suits indexed as described above
Converts the given card code into a string presentation.
String
:
a string representation of the card in question, i.e.
Ah
Determines the code for the given hand.
Number
:
the card code that can be used to further evaluate the hand
Determines the code for the given hands.
Array<Number>
:
the card codes that can be used to further evaluate the hands
Determines the code for the given hands.
Array<Number>
:
the card codes that can be used to further evaluate the hands