Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Games and state

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

NameTypeDescription
handreadonly string[]

The player’s held cards, or the hand number for a deal.

cardsreadonly 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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.