klondikeWonfunction
Whether every card is home.
Import it
import { klondikeWon } from "@johnmorrisdotca/toranpu/klondike";
Definition
function klondikeWon(table: KlondikeTable): boolean
Parameters
| Name | Type | Description |
|---|---|---|
table | KlondikeTable | The native solitaire table; move helpers leave the input unchanged. |
Returns
boolean
Whether every card is home.
Examples
import { dealKlondike, dealOfSeed, deckOf, klondikeWon } from "@johnmorrisdotca/toranpu/klondike";
const table = dealKlondike(deckOf(dealOfSeed(42))!, { draw: 3, passes: 3 });
console.log(klondikeWon(table));falseWhat it prints (run when this page was built)