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

centreSquaresfunction

The four centre squares, top-left first. Even boards only; the centre is between four cells.

Import it

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

Definition

function centreSquares(size: number): Point[]

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

Returns

Point[]

The four centre squares, top-left first. Even boards only; the centre is between four cells.

Examples

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

console.log(centreSquares(8));
[
  { row: 3, col: 3 },
  { row: 3, col: 4 },
  { row: 4, col: 3 },
  { row: 4, col: 4 }
]

What it prints (run when this page was built)

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