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

rowNumberfunction

Row number counted from the bottom edge, so the bottom row is 1.

Import it

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

Definition

function rowNumber(size: number, row: number): number

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

rownumber

The zero-based row counted from the top.

Returns

number

Row number counted from the bottom edge, so the bottom row is 1.

Examples

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

console.log(rowNumber(15,7));
8

What it prints (run when this page was built)

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