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

territoriesHeldfunction

How many territories an owner holds.

Import it

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

Definition

function territoriesHeld(owners: readonly TenkaOwner[], owner: TenkaOwner): number

Parameters

NameTypeDescription
ownersreadonly number[]

The territory owners in native map order.

ownernumber

The seat index, or the neutral-owner marker.

Returns

number

How many territories an owner holds.

Examples

import { startTenka, territoriesHeld } from "@johnmorrisdotca/tenka";

const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(territoriesHeld(game.owners,0));
14

What it prints (run when this page was built)

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