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

stackUpMovesfunction

Every move the seat to play may make: each card that fits a building pile, from the hand, the stock or a discard pile; each card of the hand on each discard pile; and a pass when the hand is empty.

Import it

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

Definition

function stackUpMoves(game: StackUpGame): StackUpMove[]

Parameters

NameTypeDescription
gameStackUpGame

The current native game; applying a move returns a new state.

Returns

StackUpMove[]

Every move the seat to play may make.

Examples

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

What it prints (run when this page was built)

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