Reference · Pipes, rules and solving
twistsOffunction
The twists a board has, in the order the levels teach them: none for a plain board.
Import it
import { twistsOf } from "@johnmorrisdotca/suido";
Definition
function twistsOf(layout: Pick<Layout, "kind" | "wrap" | "sources" | "locked" | "walls" | "bigs" | "blocks">): Twist[]
Parameters
| Name | Type | Description |
|---|---|---|
layout | Pick<Layout, "locked" | "walls" | "wrap" | "bigs" | "blocks" | "kind" | "sources"> | The decoded board with its dimensions, pipe masks and rule settings. |
Returns
Twist[]
The twists a board has, in the order the levels teach them: none for a plain board.
Examples
import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { decodeLayout, twistsOf } from "@johnmorrisdotca/suido";
const row = SUIDO_5X5[0];
const code = row[0];
const layout = decodeLayout(code)!;
console.log(twistsOf(layout));[]What it prints (run when this page was built)