bigTwoPlaysfunction
Every play this hand could make, each once, lowest cards first within a kind.
Import it
import { bigTwoPlays } from "@johnmorrisdotca/toranpu/big-two";
Definition
function bigTwoPlays(hand: readonly CardId[]): CardId[][]
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly string[] | The player’s held cards, or the hand number for a deal. |
Returns
string[][]
Every play this hand could make, each once, lowest cards first within a kind.
Examples
import { bigTwoPlays } from "@johnmorrisdotca/toranpu/big-two";
console.log(bigTwoPlays(["3D", "3C", "4H"]));[ [ '3D' ], [ '3C' ], [ '4H' ], [ '3D', '3C' ] ]What it prints (run when this page was built)