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 · Games and state

CardGameTabletype

What a game's table offers: how many may sit at it, and how long a game may last.

Import it

import type { CardGameTable } from "@johnmorrisdotca/toranpu";

Definition

type CardGameTable = {
    fewestPlayers: number;
    mostPlayers: number;
    defaultPlayers: number;
    sizes: readonly number[];
    defaultSize: number;
};

Members

NameTypeDescription
fewestPlayersnumber

The fewest players a table may start with.

mostPlayersnumber

The most.

defaultPlayersnumber

The usual number.

sizesreadonly number[]

The lengths of game offered, in the game's own terms (below).

defaultSizenumber

The usual length.

Examples

import type { CardGameTable } from "@johnmorrisdotca/toranpu";
import { CARD_GAME_TABLES } from "@johnmorrisdotca/toranpu";

const value: CardGameTable = CARD_GAME_TABLES.hearts;
console.log(value.defaultPlayers);
4

What it prints (run when this page was built)

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