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

canForfeitfunction

Whether a recorded forfeit could have been written here: only where the clock had no pass to write instead. The replay's half of forfeitOnRecord, and the reason a forfeit where a pass was on offer is refused rather than read — it is a record the claim could not have made.

Import it

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

Definition

function canForfeit(state: GameState): boolean

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

Returns

boolean

Whether a recorded forfeit could have been written here: only where the clock had no pass to write instead. The replay's half of forfeitOnRecord, and the reason a forfeit where a pass was on offer is refused rather than read — it is a record the claim could not have made.

Examples

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

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

What it prints (run when this page was built)

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