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

queuedPiecefunction

The piece the colour to move must lay next, or null outside the piece games.

Import it

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

Definition

function queuedPiece(state: GameState): Piece | null

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

Returns

Piece | null

The piece in hand, or null when this variant has no piece queue.

Examples

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

const queued = createGame({variant:"dominoFive",seed:42});
console.log(queuedPiece(queued));
{
  cells: [
    { row: 0, col: 0, stone: 'white' },
    { row: 0, col: 1, stone: 'black' }
  ]
}

What it prints (run when this page was built)

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