Reference · Rules, solvers and generation
letGofunction
Letting go: a line of only its stone is no line (a tap on a stone clears it), and a line ends before a bridge it stopped on.
Import it
import { letGo } from "@johnmorrisdotca/tsunagi";
Definition
function letGo(lines: Lines, layout?: LinkLayout): Lines
Parameters
| Name | Type | Description |
|---|---|---|
lines | Lines | The native cell lists for every pair. |
layout (optional) | LinkLayout | undefined | The decoded native board and its rule settings. |
Returns
Lines
Letting go: a line of only its stone is no line (a tap on a stone clears it), and a line ends before a bridge it stopped on.
Examples
import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import { decodeLayout, letGo, noLines } from "@johnmorrisdotca/tsunagi";
const givens = TSUNAGI_4[0][0];
const layout = decodeLayout(givens,4)!;
const lines = noLines(layout);
console.log(letGo(lines,layout));[ [], [], [], [] ]What it prints (run when this page was built)