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

spiderDeckfunction

The hundred and four cards of a game of so many suits, sorted: each suit's thirteen, as many times as fill two decks.

Import it

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

Definition

function spiderDeck(suits: number): number[]

Parameters

NameTypeDescription
suitsnumber

The allowed suits.

Returns

number[]

The hundred and four cards of a game of so many suits, sorted: each suit's thirteen, as many times as fill two decks.

Examples

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

console.log(spiderDeck(1).length);
104

What it prints (run when this page was built)

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