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
引数
| 名前 | 型 | 説明 |
|---|---|---|
target | HTMLElement | 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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。