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

skipTargetfunction

Where a skipped turn puts its stone: the open intersection furthest from the action, picked from the corner chosen by roll. A skip is still a stone on the board — it just spends the turn somewhere that should not matter.

Import it

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

Definition

function skipTarget(state: GameState, roll?: number): Point | null

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

roll (optional)number

A random value in [0,1), supplied for reproducible choices.

Returns

Point | null

The chosen empty point, or null when no point is available.

Examples

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

console.log(skipTarget(createGame({allowSkip:true}), 0.5));
{ row: 14, col: 0 }

What it prints (run when this page was built)

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