prange

Converts a short notation for poker hand ranges into an array filled with the matching combos.

Each range specifier is separated by a comma.

The following notations are supported:

  • single combos KK, AK, ATs
  • plus notation

    • QQ+ = [ AA, KK, QQ ]
    • KTs+ = [ KQs, KJs, KTs ]
    • KTo+ = [ KQo, KJo, KTo ]
    • KT+ = [ KQs, KQo, KJo, KJs, KTo, KTs ]
  • dash notation

    • KK-JJ = [ KK, QQ, JJ ]
    • AKo-ATo = [ AK, AQ, AJ, AT ]
    • AKs-JTs = [ AKs, KQs, JTs ]
prange(s: String): Array<String>
Parameters
s (String) the short notation for the range
Returns
Array<String>: all hand combos satisfying the given range

prange.reverse

Converts a poker hand range to short notation. It's the opposite of prange.

prange.reverse(combos: Array<String>, the: String)
Parameters
combos (Array<String>) hand combos to be converted to short notation
the (String) short notation for the range