meldsInfunction
Every meld that can be made from these cards: each set of three or four, and each run of three or more.
Import it
import { meldsIn } from "@johnmorrisdotca/toranpu/gin-rummy";
Definition
function meldsIn(hand: readonly CardId[]): GinMeld[]
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly string[] | The player’s held cards, or the hand number for a deal. |
Returns
GinMeld[]
Every meld that can be made from these cards: each set of three or four, and each run of three or more.
Examples
import { meldsIn } from "@johnmorrisdotca/toranpu/gin-rummy";
console.log(meldsIn(["3H", "4H", "5H", "AS"]));[ [ '3H', '4H', '5H' ] ]What it prints (run when this page was built)