DrawBoardOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What to draw besides the board and the stones. Every field is optional.
インポート
import type { DrawBoardOptions } from "@johnmorrisdotca/narabe/draw";
定義
type DrawBoardOptions = {
width?: number;
title?: string;
lastMove?: boolean;
winningLine?: boolean;
forbidden?: boolean;
legal?: boolean;
selected?: Point;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
width (省略可) | number | undefined | The width in pixels. Unless said, the SVG has a |
title (省略可) | string | undefined | What a screen reader says for the picture. Unless said, "Board". An empty string makes it decoration. |
lastMove (省略可) | boolean | undefined | Mark the last move with a dot. Unless said, on. |
winningLine (省略可) | boolean | undefined | Ring the stones of a winning line. Unless said, on. |
forbidden (省略可) | boolean | undefined | Cross the points a forbidden-move rule (renju, omok) refuses. Unless said, off. |
legal (省略可) | boolean | undefined | Dot every point the player to move may play, or the squares the piece on |
selected (省略可) | Point | undefined | A piece picked up: its moves are dotted when |
例
import type { DrawBoardOptions } from "@johnmorrisdotca/narabe/draw";
const value: DrawBoardOptions = {width:480,title:"Opening position",legal:true};
console.log(value);{ width: 480, title: 'Opening position', legal: true }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。