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

hasFlipMovefunction

Whether the colour has a legal disc-flipping move.

Import it

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

Definition

function hasFlipMove(state: GameState, stone: Stone): boolean

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

stoneStone

The black or white colour being examined.

Returns

boolean

Whether the colour has a legal disc-flipping move.

Examples

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

const reversi = createGame({variant:"reversi"});
console.log(hasFlipMove(reversi,"black"));
true

What it prints (run when this page was built)

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