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 · Big Two

bigTwoValuefunction

What these cards are worth played together, or null for cards that make no play.

Import it

import { bigTwoValue } from "@johnmorrisdotca/toranpu/big-two";

Definition

function bigTwoValue(cards: readonly CardId[]): BigTwoValue | null

Parameters

NameTypeDescription
cardsreadonly string[]

The cards in their current order.

Returns

BigTwoValue | null

What these cards are worth played together, or null for cards that make no play.

Examples

import { bigTwoValue } from "@johnmorrisdotca/toranpu/big-two";

console.log(bigTwoValue(["3D", "3C"]));
{ kind: 'pair', size: 2, strength: 1 }

What it prints (run when this page was built)

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