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

availableOpeningsfunction

The openings these settings may use: what the variant offers, less the colour-swapping ones when a handicap is bound to a colour — and only the free opening under a head start. Pro and the renju protocols count stones from the first, and a head start's free turns and starting pieces are exactly what that count does not expect.

Import it

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

Definition

function availableOpenings(settings: GameSettings): OpeningRule[]

Parameters

NameTypeDescription
settingsGameSettings

The native game settings to interpret.

Returns

OpeningRule[]

The opening identifiers allowed by the variant, handicap and head-start terms.

Examples

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

const state = createGame({variant:"freestyle",size:15});
console.log(availableOpenings(state.settings));
[ 'free', 'pro', 'longPro', 'swap', 'swap2' ]

What it prints (run when this page was built)

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