Skip to the content

Toranpuトランプ

Use a deck, play twelve games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Stack Up

stackUpValuefunction

What a card counts for: its number 1 to 12, or 0 for a wild, which is whatever a pile wants.

Import it

import { stackUpValue } from "@johnmorrisdotca/toranpu/stack-up";

Definition

function stackUpValue(card: CardId): number

Parameters

NameTypeDescription
cardstring

The card id to read.

Returns

number

What a card counts for: its number 1 to 12, or 0 for a wild.

Examples

import { stackUpValue } from "@johnmorrisdotca/toranpu/stack-up";
console.log(stackUpValue("n07"));
7

What it prints (run when this page was built)

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