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 · Go Fish

GoFishEventtype

What the whole table saw of a turn: who asked whom for what, how many cards were handed over, and — when none were — whether the card drawn from the pond was the rank asked for (which is shown, and earns another ask). A card drawn for any other reason is drawn face down: drew says only that it was.

Import it

import type { GoFishEvent } from "@johnmorrisdotca/toranpu/go-fish";

Definition

type GoFishEvent = {
    kind: "ask";
    seat: number;
    asked: number;
    rank: CardRank;
    got: number;
    fished: "caught" | "missed" | "dry" | null;
} | {
    kind: "draw";
    seat: number;
} | {
    kind: "book";
    seat: number;
    rank: CardRank;
};

Examples

import type { GoFishEvent } from "@johnmorrisdotca/toranpu/go-fish";

const value: GoFishEvent = { kind: "book", seat: 0, rank: 1 };
console.log(value.kind);
book

What it prints (run when this page was built)

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