Reference · Rules, solvers and generation
encodeWallsfunction
The walls as a layout writes them, after the cells: nothing where there are none.
Import it
import { encodeWalls } from "@johnmorrisdotca/tsunagi";
Definition
function encodeWalls(walls: Iterable<string>): string
Parameters
| Name | Type | Description |
|---|---|---|
walls | Iterable<string> | The blocked undirected edges as a-b strings. |
Returns
string
The walls as a layout writes them, after the cells: nothing where there are none.
Examples
import { encodeWalls } from "@johnmorrisdotca/tsunagi";
console.log(encodeWalls(new Set(["1-2","1-5"])));|1-2,1-5What it prints (run when this page was built)