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