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

dealSpiderfunction

Deal a shuffled deck (card numbers, the first dealt first) into a table.

Import it

import { dealSpider } from "@johnmorrisdotca/toranpu/spider";

Definition

function dealSpider(deck: readonly number[]): SpiderTable

Parameters

NameTypeDescription
deckreadonly number[]

The deck in its current order; the input is left unchanged.

Returns

SpiderTable

Deal a shuffled deck (card numbers, the first dealt first) into a table.

Examples

import { dealSpider, spiderDealOfSeed, spiderDeckOf } from "@johnmorrisdotca/toranpu/spider";

console.log(dealSpider(spiderDeckOf(spiderDealOfSeed(42, 1), 1)!).stock.length);
50

What it prints (run when this page was built)

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