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

longestPossibleGamefunction

The most moves a game of these settings can contain, or null when nothing in the rules bounds it.

Read from the spec rather than from a list of variant names, so a game added tomorrow is classified the day it lands.

Import it

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

Definition

function longestPossibleGame(settings: GameSettings): number | null

Parameters

NameTypeDescription
settingsGameSettings

The native game settings to interpret.

Returns

number | null

The board-based maximum move count, or null when captures, clearing or moving pieces remove that bound.

Examples

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

const state = createGame({variant:"freestyle",size:15});
console.log(longestPossibleGame(state.settings));
225

What it prints (run when this page was built)

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