Reference · Rules, solvers and generation
edgeOpenfunction
Whether a line may step from cell a to its neighbour b: no wall between them.
Import it
import { edgeOpen } from "@johnmorrisdotca/tsunagi";
Definition
function edgeOpen(layout: LinkLayout, a: number, b: number): boolean
Parameters
| Name | Type | Description |
|---|---|---|
layout | LinkLayout | The decoded native board and its rule settings. |
a | number | The first cell index. |
b | number | The second cell index. |
Returns
boolean
Whether a line may step from cell a to its neighbour b: no wall between them.
Examples
import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import { decodeLayout, edgeOpen } from "@johnmorrisdotca/tsunagi";
const givens = TSUNAGI_4[0][0];
const layout = decodeLayout(givens,4)!;
console.log(edgeOpen(layout,0,1));trueWhat it prints (run when this page was built)