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

previousBoardSizefunction

The next size down, or null when the board is already the smallest.

Import it

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

Definition

function previousBoardSize(size: number, sizes?: readonly number[]): number | null

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

sizes (optional)readonly number[]

The supported side lengths in ascending order.

Returns

number | null

The previous supported size, or null at the smallest size.

Examples

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

console.log(previousBoardSize(13,[9,13,19]));
9

What it prints (run when this page was built)

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