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

recyclesLeftfunction

How many times the waste may still be turned back: passes less one, less those already made.

Import it

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

Definition

function recyclesLeft(table: KlondikeTable): number

Parameters

NameTypeDescription
tableKlondikeTable

The native solitaire table; move helpers leave the input unchanged.

Returns

number

How many times the waste may still be turned back: passes less one, less those already made.

Examples

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

const table = dealKlondike(deckOf(dealOfSeed(42))!, { draw: 3, passes: 3 });
console.log(recyclesLeft(table));
2

What it prints (run when this page was built)

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