Reference · Pipes, rules and solving
referenceForfunction
The reference set a board is scored against: that of the board's side (the square root of its cells, to the nearest size there is a set for), kind and wrap. A board of a size no set was made for is scored among the nearest. A board's walls and locked pieces are not part of its set: they make it easier than the boards of its set, and its score says so.
Import it
import { referenceFor } from "@johnmorrisdotca/suido";
Definition
function referenceFor(layout: Pick<Layout, "width" | "height" | "kind" | "wrap">): Reference
Parameters
| Name | Type | Description |
|---|---|---|
layout | Pick<Layout, "wrap" | "width" | "height" | "kind"> | The decoded board with its dimensions, pipe masks and rule settings. |
Returns
Reference
The reference set a board is scored against: that of the board's side (the square root of its cells, to the nearest size there is a set for), kind and wrap. A board of a size no set was made for is scored among the nearest. A board's walls and locked pieces are not part of its set: they make it easier than the boards of its set, and its score says so.
Examples
import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { decodeLayout, referenceFor } from "@johnmorrisdotca/suido";
const row = SUIDO_5X5[0];
const code = row[0];
const layout = decodeLayout(code)!;
console.log(referenceFor(layout).blend.length);101What it prints (run when this page was built)