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

upcomingPiecesfunction

The pieces after the one in hand, for the preview.

Import it

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

Definition

function upcomingPieces(state: GameState, count: number): Piece[]

Parameters

NameTypeDescription
stateGameState

The current immutable game position.

countnumber

The number of upcoming queue pieces to read.

Returns

Piece[]

The pieces after the one in hand, for the preview.

Examples

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

const queued = createGame({variant:"dominoFive",seed:42});
console.log(upcomingPieces(queued,2));
[
  { cells: [ [Object], [Object] ] },
  { cells: [ [Object], [Object] ] }
]

What it prints (run when this page was built)

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