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

campOffunction

Whose home camp point lies in, or null for the open board.

Import it

import { campOf } from "@johnmorrisdotca/narabe";

Definition

function campOf(size: number, point: Point): Stone | null

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

pointPoint

A zero-based row and column on the board.

Returns

Stone | null

The starting camp colour, or null outside both camps.

Examples

import { campOf } from "@johnmorrisdotca/narabe";

console.log(campOf(8,{row:0,col:0}));
black

What it prints (run when this page was built)

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