dealKlondikefunction
Deal a deck (card numbers, the first dealt first) into a table: column by column along each row, as a dealer does.
Import it
import { dealKlondike } from "@johnmorrisdotca/toranpu/klondike";
Definition
function dealKlondike(deck: readonly number[], rules: KlondikeRules): KlondikeTable
Parameters
| Name | Type | Description |
|---|---|---|
deck | readonly number[] | The deck in its current order; the input is left unchanged. |
rules | KlondikeRules | The game-specific rules or solver rules. |
Returns
KlondikeTable
Deal a deck (card numbers, the first dealt first) into a table: column by column along each row, as a dealer does.
Examples
import { dealKlondike, dealOfSeed, deckOf } from "@johnmorrisdotca/toranpu/klondike";
console.log(dealKlondike(deckOf(dealOfSeed(42))!, { draw: 3, passes: 3 }).stock.length);24What it prints (run when this page was built)