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

freeCellPileCardsfunction

The cards of a pile, bottom first, as the table holds them.

Import it

import { freeCellPileCards } from "@johnmorrisdotca/toranpu/freecell";

Definition

function freeCellPileCards(table: FreeCellTable, pile: FreeCellPile): readonly number[]

Parameters

NameTypeDescription
tableFreeCellTable

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

pileFreeCellPile

The pile to inspect or arrange.

Returns

readonly number[]

The cards of a pile, bottom first, as the table holds them.

Examples

import { dealFreeCell, dealOfSeed, deckOf, freeCellPileCards } from "@johnmorrisdotca/toranpu/freecell";

const table = dealFreeCell(deckOf(dealOfSeed(42))!, 4);
console.log(freeCellPileCards(table, "1"));
[
  41, 35, 27, 19,
  15, 36, 32
]

What it prints (run when this page was built)

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