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

createGamefunction

Create an initial immutable position from native settings and an opening roll.

Import it

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

Definition

function createGame(overrides?: Partial<GameSettings>, roll?: number): GameState

Parameters

NameTypeDescription
overrides (optional)Partial<GameSettings>

Optional settings over the native defaults.

roll (optional)number

A random value in [0,1), supplied for reproducible choices.

Returns

GameState

The resulting position; a refused or inapplicable action leaves the input position unchanged.

Examples

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

console.log(createGame({variant:"reversi"}).board.length);
64

What it prints (run when this page was built)

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