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

chooseColourfunction

The deciding seat takes stone. Seats are exchanged if that colour is not already theirs; the board and the colour to move are untouched.

Import it

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

Definition

function chooseColour(state: GameState, stone: Stone): GameState

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

stoneStone

The black or white colour being examined.

Returns

GameState

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

Examples

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

const state = createGame({variant:"freestyle",size:15});
console.log(chooseColour(state,"black").opening.stage);
done

What it prints (run when this page was built)

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