MoveInputtype
The shape of a move as a record or a request carries it, without the colour.
Import it
import type { MoveInput } from "@johnmorrisdotca/narabe";
Definition
type MoveInput = Point & {
kind?: string;
stone?: string;
from?: Point;
twist?: Twist;
cells?: PieceCell[];
};
Members
| Name | Type | Description |
|---|---|---|
row | number | |
col | number | |
kind (optional) | string | undefined | As a record stores it: a string, checked against MOVE_KINDS where it matters. |
stone (optional) | string | undefined | The colour placed, where the mover chose it. |
from (optional) | Point | undefined | |
twist (optional) | Twist | undefined | |
cells (optional) | PieceCell[] | undefined |
Examples
import type { MoveInput } from "@johnmorrisdotca/narabe";
const value: MoveInput = {row:7,col:7};
console.log(value);{ row: 7, col: 7 }What it prints (run when this page was built)