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

stonesLeftfunction

Stones the colour to move still has to place before the turn passes.

Import it

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

Definition

function stonesLeft(state: GameState): number

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

Returns

number

Stones the colour to move still has to place before the turn passes.

Examples

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

const state = createGame({variant:"freestyle",size:15});
console.log(stonesLeft(state));
1

What it prints (run when this page was built)

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