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 · Browser table and SVG

TenkaLandtype

One territory as a drawing needs it.

Import it

import type { TenkaLand } from "@johnmorrisdotca/tenka/ui";

Definition

type TenkaLand = {
    territory: number;
    key: string;
    name: string;
    outline: string;
    fill: string;
    ring: TenkaRing;
    at: readonly [
        number,
        number
    ];
    armies: number;
    owner: number;
};

Members

NameTypeDescription
territorynumber

Its number.

keystring

Its key, such as "alaska".

namestring

Its name in English.

outlinestring

Its outline, one SVG path in map units.

fillstring

The colour of whoever holds it.

ringTenkaRing

How it is ringed, if it is.

atreadonly [number, number]

Where its counter stands, in map units.

armiesnumber

The armies standing on it.

ownernumber

The seat that holds it, or TENKA_NEUTRAL.

Examples

import { startTenka } from "@johnmorrisdotca/tenka";
import type { TenkaLand } from "@johnmorrisdotca/tenka/ui";
import { tenkaMapModel } from "@johnmorrisdotca/tenka/ui";

const game = startTenka(10,["Seat 1","Seat 2"],42)!;
const value: TenkaLand = tenkaMapModel(game).lands[0];
console.log(value);
{
  territory: 0,
  key: 'alaska',
  name: 'Alaska',
  outline: 'M21 176l11-1 6-4 1-4 6-6 0 2 1-1 4 0 5-3 0 2 1 0 0-1 3-1-4-1 4-2 1 0-1 1 8-1 4-2 2-3 7 2-3 2 0 1 3 0 2-2 2 0 1 1-1 0 0 1 3 1 6-2 5 1-1 3 4 0-1 1 4 1 0-1 13 0 2 2 2-1 0 1 2 0 0 1 11 0 3 1 0 1 3 0 1-1 10 0 6 4 3 0 0 84 2 1 1 0 0-1 2 1 6-1-2 4 2-1 8 6 1 2-3 1 0-1-2 0 0-1-8-3 0-1 1 0 0-3-3 2-7-1 1-1-1-1 0 1-4-1-8 0-3 1-1-2-3-1 0-2-3 2-3-1 1-2-4 0-1-3 2-1-2 0 0 1-2 1 0-1-1 0 0 1-4 0 1-2-1 0 0 1-2 0 0 2-2 0 2 1 0 1 2 0-3 5-3 0-1-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3 1 0 2 4 2zM182 263l1-1 2 0zM217 297l-1 0 0-3-1-1 2-1-1 0-1-6-3 1-1 3-2 0 0-2 3-3-2 0-5-6-3-1-1-5 3 2 1-2 3 4 1 0-1 1 2 1-1 1 1 0 1 2 2 0 2 2 6 2-1 3 1 3zM37 216l1 0 0 1zM41 194l2 0 2 4-3-2zM19 181l-1 0 1-1zM14 253l8-1 2 0 0 3-1 1-4 0zM21 256l1 1-1 0zM194 275l-4-1 0 2-5-4 0-2 4-1 1 2 1-1 3 1-1 2zM84 276l2-2 2 0 0 1 2 1-1-4 4 1 0-2 2 2 2-1 1 3-3 0-1 2-2 0-2 2-3-1 0 2zM90 279l0 1-1 1-1 0 0-1z',
  fill: '#3a6fb5',
  ring: null,
  at: [ 99, 216 ],
  armies: 4,
  owner: 1
}

What it prints (run when this page was built)

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