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
| Name | Type | Description |
|---|---|---|
orientation | readonly PieceCell[] | Relative coloured cells after rotation or reflection. |
anchor | Point | 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)