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 · Games and state

CARD_GAME_KINDSconstant

The eleven kinds by name, for code that would rather not type a string twice.

Import it

import { CARD_GAME_KINDS } from "@johnmorrisdotca/toranpu";

Definition

const CARD_GAME_KINDS: { readonly hearts: "hearts"; readonly bigTwo: "bigTwo"; readonly president: "president"; readonly goFish: "goFish"; readonly crazyEights: "crazyEights"; readonly spades: "spades"; readonly ginRummy: "ginRummy"; readonly euchre: "euchre"; readonly cribbage: "cribbage"; readonly ohHell: "ohHell"; readonly war: "war"; } = {
    hearts: "hearts",
    bigTwo: "bigTwo",
    president: "president",
    goFish: "goFish",
    crazyEights: "crazyEights",
    spades: "spades",
    ginRummy: "ginRummy",
    euchre: "euchre",
    cribbage: "cribbage",
    ohHell: "ohHell",
    war: "war",
} as const satisfies Record<CardGameKind, CardGameKind>

Members

NameTypeDescription
hearts"hearts"
bigTwo"bigTwo"
president"president"
goFish"goFish"
crazyEights"crazyEights"
spades"spades"
ginRummy"ginRummy"
euchre"euchre"
cribbage"cribbage"
ohHell"ohHell"
war"war"

Examples

import { CARD_GAME_KINDS } from "@johnmorrisdotca/toranpu";
console.log(CARD_GAME_KINDS);
{
  hearts: 'hearts',
  bigTwo: 'bigTwo',
  president: 'president',
  goFish: 'goFish',
  crazyEights: 'crazyEights',
  spades: 'spades',
  ginRummy: 'ginRummy',
  euchre: 'euchre',
  cribbage: 'cribbage',
  ohHell: 'ohHell',
  war: 'war'
}

What it prints (run when this page was built)

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