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
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
point | Point | 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));H8What it prints (run when this page was built)