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

OpeningStatetype

The opening protocol stage, acting seat and recorded colour choices.

Import it

import type { OpeningState } from "@johnmorrisdotca/narabe";

Definition

type OpeningState = {
    stage: OpeningStage;
    actor: Seat | null;
    choices: OpeningChoice[];
};

Members

NameTypeDescription
stageOpeningStage
actorSeat | null

The seat acting outside the normal turn order, if any.

choicesOpeningChoice[]

Every decision so far, so a stored game can be replayed through them.

Examples

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

const state = createGame({variant:"freestyle",size:15});
const value: OpeningState = state.opening;
console.log(value);
{ stage: 'done', actor: null, choices: [] }

What it prints (run when this page was built)

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