nextBoardSizefunction
The next size up, or null when the board is already the largest. A game played on boards of its own — the flipping games, on 4, 6 and 8 — grows through its own list rather than the go sizes.
Import it
import { nextBoardSize } from "@johnmorrisdotca/narabe";
Definition
function nextBoardSize(size: number, sizes?: readonly number[]): number | null
Parameters
| Name | Type | Description |
|---|---|---|
size | number | 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 next supported size, or null at the largest size.
Examples
import { nextBoardSize } from "@johnmorrisdotca/narabe";
console.log(nextBoardSize(9,[9,13,19]));13What it prints (run when this page was built)