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

lastMovefunction

The point of the latest stone or piece move; null when no point was played.

Import it

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

Definition

function lastMove(state: GameState): Point | null

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

Returns

Point | null

The last played point, or null when no move with a board point exists.

Examples

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

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

What it prints (run when this page was built)

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