spiderDealMovefunction
What a press on the stock does: deal, or nothing while a column is empty or the stock is spent.
Import it
import { spiderDealMove } from "@johnmorrisdotca/toranpu/spider";
Definition
function spiderDealMove(table: SpiderTable): SpiderMove | null
Parameters
| Name | Type | Description |
|---|---|---|
table | SpiderTable | The native solitaire table; move helpers leave the input unchanged. |
Returns
SpiderMove | null
The next deal move, or null when a column is empty or the stock is spent.
Examples
import { dealSpider, spiderDealMove, spiderDealOfSeed, spiderDeckOf } from "@johnmorrisdotca/toranpu/spider";
const table = dealSpider(spiderDeckOf(spiderDealOfSeed(42, 1), 1)!);
console.log(spiderDealMove(table));{ kind: 'deal' }What it prints (run when this page was built)