Reference · Rules, solvers and generation
portalsAreAmbiguousfunction
Whether two ways for a line to go from one cell to another exist on a board with portals (a portal and a step beside it, or two portals, or one in two directions), which an answer's cells could not tell apart.
Import it
import { portalsAreAmbiguous } from "@johnmorrisdotca/tsunagi";
Definition
function portalsAreAmbiguous(layout: LinkLayout): boolean
Parameters
| Name | Type | Description |
|---|---|---|
layout | LinkLayout | The decoded native board and its rule settings. |
Returns
boolean
Whether two ways for a line to go from one cell to another exist on a board with portals (a portal and a step beside it, or two portals, or one in two directions), which an answer's cells could not tell apart.
Examples
import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import { decodeLayout, portalsAreAmbiguous } from "@johnmorrisdotca/tsunagi";
const givens = TSUNAGI_4[0][0];
const layout = decodeLayout(givens,4)!;
console.log(portalsAreAmbiguous(layout));falseWhat it prints (run when this page was built)