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

mustPassfunction

Whether the colour to move has nothing it may play. Then the turn passes, on the record, rather than the game stopping where it stands.

Gated to piece games once, so a stone game reaching the same condition fell through it: a handicap forbids shapes to one colour, and the last point on a board can be a shape that colour may not make. The board then never fills, the draw never comes, and neither can move. Passing decides nothing.

Import it

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

Definition

function mustPass(state: GameState): boolean

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

Returns

boolean

Whether the colour to move has nothing it may play. Then the turn passes, on the record, rather than the game stopping where it stands. Gated to piece games once, so a stone game reaching the same condition fell through it: a handicap forbids shapes to one colour, and the last point on a board can be a shape that colour may not make. The board then never fills, the draw never comes, and neither can move. Passing decides nothing.

Examples

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

const state = createGame({variant:"freestyle",size:15});
console.log(mustPass(state));
false

What it prints (run when this page was built)

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