Reference · Pipes, rules and solving
blockCellsfunction
The four cells of the block whose top left cell is anchor, clockwise from it.
Import it
import { blockCells } from "@johnmorrisdotca/suido";
Definition
function blockCells(anchor: number, width: number): [number, number, number, number]
Parameters
| Name | Type | Description |
|---|---|---|
anchor | number | The top-left cell of a four-cell block. |
width | number | The board width in cells. |
Returns
[number, number, number, number]
The four cells of the block whose top left cell is anchor, clockwise from it.
Examples
import { blockCells } from "@johnmorrisdotca/suido";
console.log(blockCells(0,5));[ 0, 1, 6, 5 ]What it prints (run when this page was built)