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 · Deck tools

SuitDisplaytype

How a suit is written and drawn.

Import it

import type { SuitDisplay } from "@johnmorrisdotca/toranpu/deck";

Definition

type SuitDisplay = {
    symbol: string;
    name: string;
    colour: SuitColour;
};

Members

NameTypeDescription
symbolstring

The Unicode suit, for a sentence or an aria label: ♠ ♥ ♦ ♣.

namestring

Its name in English, lower case, as a sentence uses it.

colourSuitColour

Examples

import type { SuitDisplay } from "@johnmorrisdotca/toranpu/deck";
import { SUIT_DISPLAY } from "@johnmorrisdotca/toranpu/deck";

const value: SuitDisplay = SUIT_DISPLAY.spades;
console.log(value.symbol);
♠

What it prints (run when this page was built)

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