Skip to the content

Toranpuトランプ

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

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Stack Up

startStackUpfunction

A new game of Stack Up for two to six players with a stock pile of this size, dealt from the seed, or null for a table it is not offered for.

Import it

import { startStackUp } from "@johnmorrisdotca/toranpu/stack-up";

Definition

function startStackUp(size: number, players: readonly string[], _language?: unknown, dealt?: number, computers?: readonly boolean[]): StackUpGame | null

Parameters

NameTypeDescription
sizenumber

The cards in each player's stock pile: 10, 15 or 20.

playersreadonly string[]

The player names in seat order.

_language (optional)unknown

An unused legacy language argument retained for compatibility.

dealt (optional)number | undefined

The numeric seed used to deal the game.

computers (optional)readonly boolean[] | undefined

Flags by seat: true where a computer controls that seat.

Returns

StackUpGame | null

A new game of Stack Up, or null.

Examples

import { startStackUp } from "@johnmorrisdotca/toranpu/stack-up";
console.log(startStackUp(15, ["Aki", "Ben"], undefined, 42)?.hands[0]?.length);
5

What it prints (run when this page was built)

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