本文へ移動

Tenka天下

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

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

目次

リファレンス · ブラウザーの卓とSVG

mountTenka関数

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

A WHOLE TABLE OF TENKA IN PLAIN DOM: the map, whose turn it is and what to do, the players, your cards and the last dice, played against the computer (or by people taking turns on one device, with computers all false). No framework and no server; everything is in the element given.

Tap your own territory to place an army; to attack or move, tap where from, then where to, and choose from the buttons under the map. Under the players is the record of the game, which saves as JSON, text or CSV and loads a saved game back.

インポート

import { mountTenka } from "@johnmorrisdotca/tenka/ui";

定義

function mountTenka(target: HTMLElement, options?: TenkaTableOptions): TenkaTableHandle

引数

名前型説明
targetHTMLElement

The host element, including a host in a shadow root.

options (省略可)TenkaTableOptions

Native game and presentation settings.

戻り値

TenkaTableHandle

The table handle; destroy it when the host is removed.

例

import { mountTenka } from "@johnmorrisdotca/tenka/ui";
const show = (host: HTMLElement) => mountTenka(host, { seed: 7, record: false });
console.log(typeof show);
function

出力(このページを作ったときに実行した結果)

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

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