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
| Name | Type | Description |
|---|---|---|
a | number | The first territory index. |
b | number | 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));trueWhat it prints (run when this page was built)