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

gameNamefunction

A game's name: "Hearts", or "ハーツ" in Japanese.

Import it

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

Definition

function gameName(kind: CardGameKind, language?: Language): string

Parameters

NameTypeDescription
kindCardGameKind

The named card game or sound kind.

language (optional)Language

English or Japanese for the displayed words.

Returns

string

A game's name: "Hearts", or "ハーツ" in Japanese.

Examples

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

console.log(gameName("hearts", "ja"));
ハーツ

What it prints (run when this page was built)

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