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

stackUpWinnersfunction

The seats that won a game that is over: the one who emptied their stock, or at a stuck table those with the fewest cards left; empty while it is being played.

Import it

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

Definition

function stackUpWinners(game: StackUpGame): number[]

Parameters

NameTypeDescription
gameStackUpGame

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

Returns

number[]

The seats that won.

Examples

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

What it prints (run when this page was built)

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