Skip to the content

Narabe並べ

Play forty-eight abstract board games through immutable moves, legal choices and replayable records.

Narabe means arranging in Japanese, as in gomoku-narabe: five in a row. About the name

Contents

Reference · Rules and records

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

NameTypeDescription
kindstring
rownumber
colnumber
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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/narabe 1.3.0.