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

KlondikeColumntype

One of the seven columns: its cards from the bottom up, of which the first down lie face down.

Import it

import type { KlondikeColumn } from "@johnmorrisdotca/toranpu/klondike";

Definition

type KlondikeColumn = {
    down: number;
    cards: readonly number[];
};

Members

NameTypeDescription
downnumber
cardsreadonly number[]

Examples

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

const table = dealKlondike(deckOf(dealOfSeed(42))!, { draw: 3, passes: 3 });
const value: KlondikeColumn = table.tableau[0]!;
console.log(value.down);
0

What it prints (run when this page was built)

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