SlideMovetype
What a record needs of a move to say whether it slid, jumped, or went on jumping.
Import it
import type { SlideMove } from "@johnmorrisdotca/narabe";
Definition
type SlideMove = {
kind: string;
row: number;
col: number;
from?: Point;
captured?: readonly unknown[];
continuedChain?: boolean;
};
Members
| Name | Type | Description |
|---|---|---|
kind | string | |
row | number | |
col | number | |
from (optional) | Point | undefined | |
captured (optional) | readonly unknown[] | undefined | The pieces this move took, where the engine replayed it (a draughts jump takes one). |
continuedChain (optional) | boolean | undefined | A later hop of one piece's multi-jump: it starts where the last capture landed. |
Examples
import type { SlideMove } from "@johnmorrisdotca/narabe";
const value: SlideMove = {kind:"move",row:3,col:2,from:{row:5,col:0}};
console.log(value);{ kind: 'move', row: 3, col: 2, from: { row: 5, col: 0 } }What it prints (run when this page was built)