SugorokuElementOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Host mount options, including custom colours, names, a match and callbacks.
インポート
import type { SugorokuElementOptions } from "@johnmorrisdotca/sugoroku/element";
ほかのエクスポート元: @johnmorrisdotca/sugoroku/element/define
定義
type SugorokuElementOptions = SugorokuMountOptions;
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
board (省略可) | SugorokuBoardName | undefined | |
checkers (省略可) | SugorokuCheckerSetName | undefined | |
colours (省略可) | Partial<SugorokuColours> | undefined | |
theme (省略可) | "auto" | "light" | "dark" | undefined | |
home (省略可) | "left" | "right" | undefined | Which end of the board the trays are at. |
view (省略可) | Side | "auto" | undefined | Whose home board is at the bottom: |
numbers (省略可) | boolean | undefined | Numbers on the points. |
orientation (省略可) | Orientation | "auto" | undefined |
|
variant (省略可) | VariantKey | undefined | The variant. Default |
rules (省略可) | Partial<Rules> | undefined | The rules left out are a single game with no cube. |
preset (省略可) | string | undefined | A named way of playing (a |
seed (省略可) | RecordSeed | undefined | Dice from a seed, so the game can be played again; left out they are random. |
dice (省略可) | "button" | "host" | undefined |
|
computer (省略可) | { white?: Strength | null; black?: Strength | null; } | undefined | The strength of the computer for each side it plays. A side left out, or null, is played by a person. |
computerDelay (省略可) | number | undefined | How long the computer pauses between what it does, in milliseconds. Default 450, and none for a reader who has asked for less motion. |
controls (省略可) | boolean | undefined | The buttons and the lines of words. Default true. |
drag (省略可) | boolean | undefined | Whether a checker may be dragged as well as tapped. Default true. |
autoEnd (省略可) | boolean | undefined | End a turn at once when it is played out, without waiting for Done. Default false. |
language (省略可) | SugorokuLanguage | undefined | The language the words are in. Left out, the host's own |
names (省略可) | Partial<Record<Side, string>> | undefined | What each side is called, instead of its colour or |
sound (省略可) | boolean | Partial<Record<SoundName, string>> | undefined | Sounds: |
match (省略可) | Match | undefined | Carry on a match already begun. |
onRoll (省略可) | ((detail: SugorokuEventDetail) => void) | undefined | |
onMove (省略可) | ((detail: SugorokuEventDetail) => void) | undefined | |
onTurn (省略可) | ((detail: SugorokuEventDetail) => void) | undefined | |
onCube (省略可) | ((detail: SugorokuEventDetail) => void) | undefined | |
onEnd (省略可) | ((detail: SugorokuEventDetail) => void) | undefined |
例
import type { SugorokuElementOptions } from "@johnmorrisdotca/sugoroku/element";
const options: SugorokuElementOptions = {};
console.log(Object.keys(options).length); // 00出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。