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

footprintAtfunction

The absolute cells of an orientation anchored with its origin at anchor.

Import it

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

Definition

function footprintAt(orientation: readonly PieceCell[], anchor: Point): PieceCell[]

Parameters

NameTypeDescription
orientationreadonly PieceCell[]

Relative coloured cells after rotation or reflection.

anchorPoint

The absolute point where the relative footprint is placed.

Returns

PieceCell[]

The absolute cells of an orientation anchored with its origin at anchor.

Examples

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

const point = {row:7,col:7};
console.log(footprintAt([{row:0,col:0,stone:"black"}],point));
[ { row: 7, col: 7, stone: 'black' } ]

What it prints (run when this page was built)

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