Reference · Rules, maps and records
continentsHeldfunction
The continents a seat holds every territory of.
Import it
import { continentsHeld } from "@johnmorrisdotca/tenka";
Definition
function continentsHeld(owners: readonly TenkaOwner[], seat: TenkaOwner, map?: TenkaMap): TenkaContinent[]
Parameters
| Name | Type | Description |
|---|---|---|
owners | readonly number[] | The territory owners in native map order. |
seat | number | The zero-based player seat. |
map (optional) | TenkaMap | The native world or Europe map to use. |
Returns
TenkaContinent[]
The continents a seat holds every territory of.
Examples
import { continentsHeld, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(continentsHeld(game.owners,0).map(c=>c.key));[]What it prints (run when this page was built)