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 · Big Two

ClimbTricktype

The part of a climbing game's state the trick machinery moves: every climbing game carries these.

Import it

import type { ClimbTrick } from "@johnmorrisdotca/toranpu/big-two";

Also exported from: @johnmorrisdotca/toranpu/president

Definition

type ClimbTrick = {
    hands: CardId[][];
    pile: ClimbPlay | null;
    passed: boolean[];
    toPlay: number | null;
    played: CardId[];
};

Members

NameTypeDescription
handsstring[][]
pileClimbPlay | null

The cards to beat, or null when the seat to play leads.

passedboolean[]

Who has passed on this trick: they wait until it is cleared.

toPlaynumber | null

Whose move it is; null once the game is over.

playedstring[]

Every card played this deal, in order: what the whole table has seen.

Examples

import type { ClimbTrick } from "@johnmorrisdotca/toranpu/big-two";
import { newGame } from "@johnmorrisdotca/toranpu";

const value: ClimbTrick = newGame("bigTwo", { players: ["Aki", "Ben", "Cy", "Dev"], seed: 42 })!;
console.log(value.hands.map((hand) => hand.length));
[ 13, 13, 13, 13 ]

What it prints (run when this page was built)

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