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

areNeighboursfunction

Whether two territories are neighbours, by land or by sea.

Import it

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

Definition

function areNeighbours(a: number, b: number, map?: TenkaMap): boolean

Parameters

NameTypeDescription
anumber

The first territory index.

bnumber

The second territory index.

map (optional)TenkaMap

The native world or Europe map to use.

Returns

boolean

Whether two territories are neighbours, by land or by sea.

Examples

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

console.log(areNeighbours(0,1));
true

What it prints (run when this page was built)

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