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

defaultBoardForfunction

The board a game OPENS on, where nothing else has said: its own defaultBoard if it has one, else the first of its boards.

Asked for by name rather than read off the front of the list, because the list is in numerical order and the two facts had been the same number by accident. Sorting the lists moved Halma's default from its own sixteen to the quick eight and Honeycomb's from the 91-cell board to the 37, and nothing would have said so.

Import it

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

Definition

function defaultBoardFor(variant: RuleVariant): number

Parameters

NameTypeDescription
variantRuleVariant

The native rule variant identifier.

Returns

number

The board a game OPENS on, where nothing else has said: its own defaultBoard if it has one, else the first of its boards. Asked for by name rather than read off the front of the list, because the list is in numerical order and the two facts had been the same number by accident. Sorting the lists moved Halma's default from its own sixteen to the quick eight and Honeycomb's from the 91-cell board to the 37, and nothing would have said so.

Examples

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

console.log(defaultBoardFor("reversi"));
8

What it prints (run when this page was built)

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