fitsFoundationfunction
Whether a card may go onto its suit's foundation now.
Import it
import { fitsFoundation } from "@johnmorrisdotca/toranpu/klondike";
Definition
function fitsFoundation(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 may go onto its suit's foundation now.
Examples
import { fitsFoundation } from "@johnmorrisdotca/toranpu/klondike";
console.log(fitsFoundation(0, [0, 0, 0, 0]));trueWhat it prints (run when this page was built)