canDealfunction
Whether the stock can deal now: cards left, and no column empty.
Import it
import { canDeal } from "@johnmorrisdotca/toranpu/spider";
Definition
function canDeal(table: SpiderTable): boolean
Parameters
| Name | Type | Description |
|---|---|---|
table | SpiderTable | The native solitaire table; move helpers leave the input unchanged. |
Returns
boolean
Whether the stock can deal now: cards left, and no column empty.
Examples
import { canDeal, dealSpider, spiderDealOfSeed, spiderDeckOf } from "@johnmorrisdotca/toranpu/spider";
const table = dealSpider(spiderDeckOf(spiderDealOfSeed(42, 1), 1)!);
console.log(canDeal(table));trueWhat it prints (run when this page was built)