Reference · Rules, maps and records
tenkaMapOffunction
The map a game is played on: the one it was started on, and the world for a game saved before there was a choice.
Import it
import { tenkaMapOf } from "@johnmorrisdotca/tenka";
Definition
function tenkaMapOf(game: Pick<TenkaGame, "map"> | TenkaMapKey | undefined): TenkaMap
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaMapKey | Pick<TenkaGame, "map"> | undefined | The current native game state. |
Returns
TenkaMap
The map a game is played on: the one it was started on, and the world for a game saved before there was a choice.
Examples
import { startTenka, tenkaMapOf } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(tenkaMapOf(game).key);worldWhat it prints (run when this page was built)