Reference · Number-puzzle engines
boxedLayoutfunction
Rows, columns and boxes; with diagonal, the two long diagonals as well.
Import it
import { boxedLayout } from "@johnmorrisdotca/kazu";
Definition
function boxedLayout(size: number, diagonal?: boolean): Layout
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The supported square grid side length. |
diagonal (optional) | boolean | Whether to include both long diagonal groups. |
Returns
Layout
Rows, columns and boxes; with diagonal, the two long diagonals as well.
Examples
import { boxedLayout } from "@johnmorrisdotca/kazu";
console.log(boxedLayout(4).groups.length);12What it prints (run when this page was built)