Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

Reference · Rules, maps and records

isSetfunction

Whether three cards make a set: three of one kind, one of each kind, or any two with a wild card (a wild card stands for whatever the set needs).

Import it

import { isSet } from "@johnmorrisdotca/tenka";

Definition

function isSet(cards: readonly TenkaCard[], map?: TenkaMap): boolean

Parameters

NameTypeDescription
cardsreadonly number[]

The card indices to test as a set.

map (optional)TenkaMap

The native world or Europe map to use.

Returns

boolean

Whether three cards make a set: three of one kind, one of each kind, or any two with a wild card (a wild card stands for whatever the set needs).

Examples

import { isSet } from "@johnmorrisdotca/tenka";

console.log(isSet([0,1,2]));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tenka 2.2.0.