pileCardsfunction
The cards of a pile, bottom first, as the table holds them.
Import it
import { pileCards } from "@johnmorrisdotca/toranpu/klondike";
Definition
function pileCards(table: KlondikeTable, pile: KlondikePile): readonly number[]
Parameters
| Name | Type | Description |
|---|---|---|
table | KlondikeTable | The native solitaire table; move helpers leave the input unchanged. |
pile | KlondikePile | The pile to inspect or arrange. |
Returns
readonly number[]
The cards of a pile, bottom first, as the table holds them.
Examples
import { dealKlondike, dealOfSeed, deckOf, pileCards } from "@johnmorrisdotca/toranpu/klondike";
const table = dealKlondike(deckOf(dealOfSeed(42))!, { draw: 3, passes: 3 });
console.log(pileCards(table, "1"));[ 41 ]What it prints (run when this page was built)