Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Spider

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

NameTypeDescription
dealstring

The deal number or dealing specification.

suitsnumber

The allowed suits.

movesstring

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);
2

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.