freeCellFinishingMovesfunction
THE GAME PLAYS ITSELF OUT once nothing is left to decide: when every card still out can go home in turn, the lowest first, the moves that take them there — or null while one cannot, and the player goes on.
Import it
import { freeCellFinishingMoves } from "@johnmorrisdotca/toranpu/freecell";
Definition
function freeCellFinishingMoves(table: FreeCellTable): FreeCellMove[] | null
Parameters
| Name | Type | Description |
|---|---|---|
table | FreeCellTable | The native solitaire table; move helpers leave the input unchanged. |
Returns
FreeCellMove[] | null
THE GAME PLAYS ITSELF OUT once nothing is left to decide: when every card still out can go home in turn, the lowest first, the moves that take them there — or null while one cannot, and the player goes on.
Examples
import { dealFreeCell, dealOfSeed, deckOf, freeCellFinishingMoves } from "@johnmorrisdotca/toranpu/freecell";
const table = dealFreeCell(deckOf(dealOfSeed(42))!, 4);
console.log(freeCellFinishingMoves(table));nullWhat it prints (run when this page was built)