本文へ移動

Tenka天下

2〜6人で、シードから始まる世界征服ゲームを遊べます。さいころでの戦い、カード、コンピューターの相手、ゲームの保存に対応します。

「天下」は、天の下に広がる世界を表す言葉です。 名前について(英語)

目次

リファレンス · Reactの卓

TenkaMap関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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 { TenkaMap } from "@johnmorrisdotca/tenka/react";

定義

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

引数

名前型説明
optionsTenkaMapProps

The component, table or display options.

戻り値

React.JSX.Element

The React SVG map element.

例

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}));

ソースを見るGitHub で編集@johnmorrisdotca/tenka 2.2.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。