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 · React table

TenkaMapfunction

THE WORLD, AS A REACT COMPONENT: every territory in its owner's colour, its counter of armies, the rings of a choice, and a press on a territory or its counter reported by number. It draws; the rules stay in playTenka, and what a press means in tapTerritory. Scales to its container's width; style .tk-land, .tk-sea and the rest as you like. Where a press is wanted, each territory can be reached by Tab and pressed with Enter or Space.

Import it

import { TenkaMap } from "@johnmorrisdotca/tenka/react";

Definition

function TenkaMap({ game, marks, colours, onTerritory, label, ...svg }: TenkaMapProps): React.JSX.Element

Parameters

NameTypeDescription
optionsTenkaMapProps

The component, table or display options.

Returns

React.JSX.Element

The React SVG map element.

Examples

import {createElement} from "react";
import { TenkaMap } from "@johnmorrisdotca/tenka/react";
import {startTenka} from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(createElement(TenkaMap,{game}));

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