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 · Klondike

deckOffunction

The deck a deal string names, as card numbers, or null for one that is not a whole deck.

Import it

import { deckOf } from "@johnmorrisdotca/toranpu/klondike";

Also exported from: @johnmorrisdotca/toranpu/freecell

Definition

function deckOf(deal: string): number[] | null

Parameters

NameTypeDescription
dealstring

The deal number or dealing specification.

Returns

number[] | null

The deck a deal string names, as card numbers, or null for one that is not a whole deck.

Examples

import { dealOfSeed, deckOf } from "@johnmorrisdotca/toranpu/klondike";

console.log(deckOf(dealOfSeed(42))?.slice(0, 7));
[
  41, 47, 14, 25,
  51, 34,  6
]

What it prints (run when this page was built)

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