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

pointNamefunction

Renju-style name for an intersection, e.g. "H8" for the centre of a 15×15 board.

Import it

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

Definition

function pointName(size: number, point: Point): string

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

pointPoint

A zero-based row and column on the board.

Returns

string

Renju-style name for an intersection, e.g. "H8" for the centre of a 15×15 board.

Examples

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

const point = {row:7,col:7};
console.log(pointName(15,point));
H8

What it prints (run when this page was built)

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