isSafeHomefunction
Whether a card is one the solver treats as home safely: exported for its test.
Import it
import { isSafeHome } from "@johnmorrisdotca/toranpu/klondike";
Definition
function isSafeHome(card: number, foundation: readonly number[]): boolean
Parameters
| Name | Type | Description |
|---|---|---|
card | number | The packed card number from 0 to 51. |
foundation | readonly number[] | The foundation index or state being checked. |
Returns
boolean
Whether a card is one the solver treats as home safely: exported for its test.
Examples
import { isSafeHome } from "@johnmorrisdotca/toranpu/klondike";
console.log(isSafeHome(0, [0, 0, 0, 0]));trueWhat it prints (run when this page was built)