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

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

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

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