Reference · Rules, maps and records
setsInfunction
Every set a hand holds, each as its three cards smallest first, in order.
Import it
import { setsIn } from "@johnmorrisdotca/tenka";
Definition
function setsIn(hand: readonly TenkaCard[], map?: TenkaMap): TenkaCard[][]
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly number[] | The cards held by a player. |
map (optional) | TenkaMap | The native world or Europe map to use. |
Returns
number[][]
Every set a hand holds, each as its three cards smallest first, in order.
Examples
import { setsIn } from "@johnmorrisdotca/tenka";
console.log(setsIn([0,1,2,42]));[ [ 0, 1, 2 ], [ 0, 1, 42 ], [ 0, 2, 42 ], [ 1, 2, 42 ] ]What it prints (run when this page was built)