cribbagePlayablefunction
The cards a seat may play on the count now: any that keeps it to thirty-one.
Import it
import { cribbagePlayable } from "@johnmorrisdotca/toranpu/cribbage";
Definition
function cribbagePlayable(hand: readonly CardId[], count: number): CardId[]
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly string[] | The player’s held cards, or the hand number for a deal. |
count | number | The requested number of cards, sounds or layout positions. |
Returns
string[]
The cards a seat may play on the count now: any that keeps it to thirty-one.
Examples
import { cribbagePlayable } from "@johnmorrisdotca/toranpu/cribbage";
console.log(cribbagePlayable(["AS", "5H", "KS"], 25));[ 'AS', '5H' ]What it prints (run when this page was built)