replaySpiderfunction
A game played out from its deal: every table it passed through, the first the deal, or null where the deal is not two decks or a move is one the rules refuse. The one reader of a move list, for the table, a kept run, the check and a finished game's page alike.
Import it
import { replaySpider } from "@johnmorrisdotca/toranpu/spider";
Definition
function replaySpider(deal: string, suits: number, moves: string): SpiderTable[] | null
Parameters
| Name | Type | Description |
|---|---|---|
deal | string | The deal number or dealing specification. |
suits | number | The allowed suits. |
moves | string | The ordered native moves to replay. |
Returns
SpiderTable[] | null
A game played out from its deal: every table it passed through, the first the deal, or null where the deal is not two decks or a move is one the rules refuse. The one reader of a move list, for the table, a kept run, the check and a finished game's page alike.
Examples
import { encodeMoves, replaySpider, spiderDealOfSeed } from "@johnmorrisdotca/toranpu/spider";
console.log(replaySpider(spiderDealOfSeed(42, 1), 1, encodeMoves([{ kind: "deal" }]))?.length);2What it prints (run when this page was built)