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

canPassfunction

Whether passing is on offer: forced in a piece game with nothing to lay, free at any point in Go.

This, and not mustPass, is the question anything accepting a pass asks. A live game once asked only whether the pass was forced, which refused every chosen pass in Go — a person's click and a computer's choice alike — so a Go game on the server could never end by two passes, and a programs' game sat stuck with the engine offering a pass the server would not take.

Import it

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

Definition

function canPass(state: GameState): boolean

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

Returns

boolean

Whether passing is on offer: forced in a piece game with nothing to lay, free at any point in Go. This, and not mustPass, is the question anything accepting a pass asks. A live game once asked only whether the pass was forced, which refused every chosen pass in Go — a person's click and a computer's choice alike — so a Go game on the server could never end by two passes, and a programs' game sat stuck with the engine offering a pass the server would not take.

Examples

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

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

What it prints (run when this page was built)

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