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

bigTwoBeatsfunction

Whether a play beats the one on the table: the same number of cards, and stronger.

Import it

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

Definition

function bigTwoBeats(play: BigTwoValue, table: BigTwoValue): boolean

Parameters

NameTypeDescription
playBigTwoValue

The player’s move or cards for this step.

tableBigTwoValue

The shared table or laid cards.

Returns

boolean

Whether a play beats the one on the table: the same number of cards, and stronger.

Examples

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

console.log(bigTwoBeats(bigTwoValue(["4D"])!, bigTwoValue(["3D"])!));
true

What it prints (run when this page was built)

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