stuckfunction
Whether nothing can be done but give up: no card can move anywhere, and the stock can be neither turned nor turned back. With passes left a person may still turn the stock for a card they need, so this is only ever said of the one table where it is certainly true.
Import it
import { stuck } from "@johnmorrisdotca/toranpu/klondike";
Definition
function stuck(table: KlondikeTable): boolean
Parameters
| Name | Type | Description |
|---|---|---|
table | KlondikeTable | The native solitaire table; move helpers leave the input unchanged. |
Returns
boolean
Whether nothing can be done but give up: no card can move anywhere, and the stock can be neither turned nor turned back. With passes left a person may still turn the stock for a card they need, so this is only ever said of the one table where it is certainly true.
Examples
import { dealKlondike, dealOfSeed, deckOf, stuck } from "@johnmorrisdotca/toranpu/klondike";
const table = dealKlondike(deckOf(dealOfSeed(42))!, { draw: 3, passes: 3 });
console.log(stuck(table));falseWhat it prints (run when this page was built)