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

DIRECTIONSconstant

The four line orientations through a point. Each is checked in both its forward and reverse sense, so four entries cover all eight neighbours.

Import it

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

Definition

const DIRECTIONS: readonly Point[] = [
    { row: 0, col: 1 },
    { row: 1, col: 0 },
    { row: 1, col: 1 },
    { row: 1, col: -1 },
]

Examples

import { DIRECTIONS } from "@johnmorrisdotca/narabe";
console.log(DIRECTIONS);
[
  { row: 0, col: 1 },
  { row: 1, col: 0 },
  { row: 1, col: 1 },
  { row: 1, col: -1 }
]

What it prints (run when this page was built)

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