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

cellAtfunction

Read a cell from a valid zero-based board point; null means empty.

Import it

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

Definition

function cellAt(state: GameState, point: Point): Cell

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

pointPoint

A zero-based row and column on the board.

Returns

Cell

The cell at the point; null means the cell is empty.

Examples

import { cellAt, createGame } from "@johnmorrisdotca/narabe";

const state = createGame({variant:"freestyle",size:15});
const point = {row:7,col:7};
console.log(cellAt(state, point));
null

What it prints (run when this page was built)

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