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

skipMovefunction

Burns the turn on a corner stone. A no-op when skipping is not allowed.

Import it

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

Definition

function skipMove(state: GameState, roll?: number): GameState

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

roll (optional)number

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

Returns

GameState

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

Examples

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

console.log(skipMove(createGame({allowSkip:true}), 0.5).moves.length);
1

What it prints (run when this page was built)

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