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

endedWithNoMovesfunction

Whether the game ended because neither side had a move: two forced passes, the last two moves on the record.

Import it

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

Definition

function endedWithNoMoves(state: GameState): boolean

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

Returns

boolean

Whether the game ended because neither side had a move: two forced passes, the last two moves on the record.

Examples

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

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

What it prints (run when this page was built)

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