Reference · Pipes, rules and solving
isTwistedfunction
Whether a board has any twist.
Import it
import { isTwisted } from "@johnmorrisdotca/suido";
Definition
function isTwisted(layout: Pick<Layout, "kind" | "wrap" | "sources" | "locked" | "walls" | "bigs" | "blocks">): boolean
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
boolean
Whether a board has any twist.
Examples
import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { decodeLayout, isTwisted } from "@johnmorrisdotca/suido";
const row = SUIDO_5X5[0];
const code = row[0];
const layout = decodeLayout(code)!;
console.log(isTwisted(layout));falseWhat it prints (run when this page was built)