Reference · Rules, solvers and generation
hexagonBoardfunction
A hexagon of hexagons of this radius, as the levels' hexagons are: side 2R + 1.
Import it
import { hexagonBoard } from "@johnmorrisdotca/tsunagi";
Definition
function hexagonBoard(radius: number): TsunagiBoard
Parameters
| Name | Type | Description |
|---|---|---|
radius | number | The cells from the middle to an edge. |
Returns
TsunagiBoard
The board as a graph.
Examples
import { hexagonBoard } from "@johnmorrisdotca/tsunagi";
console.log(hexagonBoard(3).cells.length);37What it prints (run when this page was built)