MoveInput型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The shape of a move as a record or a request carries it, without the colour.
インポート
import type { MoveInput } from "@johnmorrisdotca/narabe";
定義
type MoveInput = Point & {
kind?: string;
stone?: string;
from?: Point;
twist?: Twist;
cells?: PieceCell[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
row | number | |
col | number | |
kind (省略可) | string | undefined | As a record stores it: a string, checked against MOVE_KINDS where it matters. |
stone (省略可) | string | undefined | The colour placed, where the mover chose it. |
from (省略可) | Point | undefined | |
twist (省略可) | Twist | undefined | |
cells (省略可) | PieceCell[] | undefined |
例
import type { MoveInput } from "@johnmorrisdotca/narabe";
const value: MoveInput = {row:7,col:7};
console.log(value);{ row: 7, col: 7 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。