Skip to the content

Suido水道

Turn pipes to connect the pumps and drains, through fixed levels or seeded puzzles.

Suido means water supply in Japanese. About the name

Contents

Reference · Pipes, rules and solving

exactScoreOffunction

The score of a measure against a reference set before it is rounded, from 1 to 100: what boards are put in order by, so that two boards of one whole score still have an order.

Import it

import { exactScoreOf } from "@johnmorrisdotca/suido";

Definition

function exactScoreOf(measure: Measure, reference: Reference): number

Parameters

NameTypeDescription
measureMeasure

The measured puzzle difficulty features.

referenceReference

The matching size, kind and wrap reference quantiles.

Returns

number

The score of a measure against a reference set before it is rounded, from 1 to 100: what boards are put in order by, so that two boards of one whole score still have an order.

Examples

import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { decodeLayout, exactScoreOf, measureSuido, referenceFor } from "@johnmorrisdotca/suido";
import { levelSolution } from "@johnmorrisdotca/suido/levels";

const row = SUIDO_5X5[0];
const code = row[0];
const layout = decodeLayout(code)!;
const solution = levelSolution(row)!;
const measure = measureSuido(layout,solution);
const reference = referenceFor(layout);
console.log(exactScoreOf(measure,reference));
1.5597905759162303

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/suido 1.7.0.