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

quadrantOriginfunction

The top-left corner of quadrant quadrant.

Import it

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

Definition

function quadrantOrigin(size: number, quadrantSize: number, quadrant: number): Point

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

quadrantSizenumber

The number of cells on each side of a quadrant.

quadrantnumber

The zero-based quadrant index.

Returns

Point

The top-left corner of quadrant quadrant.

Examples

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

console.log(quadrantOrigin(6,3,1));
{ row: 0, col: 3 }

What it prints (run when this page was built)

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