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 · Euchre

EuchrePhasetype

The first round of the making (take the turned card's suit, or pass), the second (name another suit, or pass — the dealer may not), the dealer's discard, the tricks, or the game over.

Import it

import type { EuchrePhase } from "@johnmorrisdotca/toranpu/euchre";

Definition

type EuchrePhase = "order" | "call" | "discard" | "playing" | "over";

Examples

import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu";
import type { EuchrePhase } from "@johnmorrisdotca/toranpu/euchre";

const names = Array.from({ length: CARD_GAME_TABLES.euchre.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`);
const game = newGame("euchre", { players: names, seed: 42 })!;
const value: EuchrePhase = game.phase;
console.log(value);
order

What it prints (run when this page was built)

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