Reference · Rules, solvers and generation
encodePortalsfunction
The portals as a layout writes them, after wrap: each pair as its smaller cell and its larger, the pairs in order; nothing where there are none.
Import it
import { encodePortals } from "@johnmorrisdotca/tsunagi";
Definition
function encodePortals(pairs: Iterable<readonly [number, number]>): string
Parameters
| Name | Type | Description |
|---|---|---|
pairs | Iterable<readonly [number, number]> | The portal-cell pairs. |
Returns
string
The portals as a layout writes them, after wrap: each pair as its smaller cell and its larger, the pairs in order; nothing where there are none.
Examples
import { encodePortals } from "@johnmorrisdotca/tsunagi";
console.log(encodePortals([[3,40]]));portals3-40What it prints (run when this page was built)