withoutfunction
The hand without these cards, or null when it does not hold every one of them.
Import it
import { without } from "@johnmorrisdotca/toranpu";
Definition
function without(hand: readonly CardId[], cards: readonly CardId[]): CardId[] | null
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly string[] | The player’s held cards, or the hand number for a deal. |
cards | readonly string[] | The cards in their current order. |
Returns
string[] | null
The hand without these cards, or null when it does not hold every one of them.
Examples
import { without } from "@johnmorrisdotca/toranpu";
console.log(without(["AS", "KH"], ["AS"]));[ 'KH' ]What it prints (run when this page was built)