finishingMovesfunction
THE GAME PLAYS ITSELF OUT once every card on the columns is face up: the moves that bring the rest home, found by the solver on a small budget (a table with nothing hidden is solved in a handful of tables), or null while a card is still face down or no way home is found — then the player goes on.
Import it
import { finishingMoves } from "@johnmorrisdotca/toranpu/klondike";
Definition
function finishingMoves(table: KlondikeTable): KlondikeMove[] | null
Parameters
| Name | Type | Description |
|---|---|---|
table | KlondikeTable | The native solitaire table; move helpers leave the input unchanged. |
Returns
KlondikeMove[] | null
THE GAME PLAYS ITSELF OUT once every card on the columns is face up: the moves that bring the rest home, found by the solver on a small budget (a table with nothing hidden is solved in a handful of tables), or null while a card is still face down or no way home is found — then the player goes on.
Examples
import { dealKlondike, dealOfSeed, deckOf, finishingMoves } from "@johnmorrisdotca/toranpu/klondike";
const table = dealKlondike(deckOf(dealOfSeed(42))!, { draw: 3, passes: 3 });
console.log(finishingMoves(table));nullWhat it prints (run when this page was built)