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

GoFishMemorytype

What the table has said about each seat's hand: for each seat, the ranks it is known to hold and known to be without.

Import it

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

Definition

type GoFishMemory = {
    holds: Set<CardRank>[];
    lacks: Set<CardRank>[];
};

Members

NameTypeDescription
holdsSet<Rank>[]
lacksSet<Rank>[]

Examples

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

const value: GoFishMemory = goFishMemory([], 4);
console.log(value.holds.length);
4

What it prints (run when this page was built)

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