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

setsInfunction

Every set a hand holds, each as its three cards smallest first, in order.

Import it

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

Definition

function setsIn(hand: readonly TenkaCard[], map?: TenkaMap): TenkaCard[][]

Parameters

NameTypeDescription
handreadonly number[]

The cards held by a player.

map (optional)TenkaMap

The native world or Europe map to use.

Returns

number[][]

Every set a hand holds, each as its three cards smallest first, in order.

Examples

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

console.log(setsIn([0,1,2,42]));
[ [ 0, 1, 2 ], [ 0, 1, 42 ], [ 0, 2, 42 ], [ 1, 2, 42 ] ]

What it prints (run when this page was built)

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