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 · Load fixed levels

firstUnsolvedLevelfunction

The lowest level of a set of count not yet solved, or null when every level of it is. It is always open: a block opens only once the block before is all solved, so the first gap is in the open blocks.

Import it

import { firstUnsolvedLevel } from "@johnmorrisdotca/suido/levels";

Also exported from: @johnmorrisdotca/suido/levels-info

Definition

function firstUnsolvedLevel(count: number, solved: ReadonlySet<number>): number | null

Parameters

NameTypeDescription
countnumber

The total number of levels.

solvedReadonlySet<number>

The set of solved one-based level numbers.

Returns

number | null

The lowest level of a set of count not yet solved, or null when every level of it is. It is always open: a block opens only once the block before is all solved, so the first gap is in the open blocks.

Examples

import { firstUnsolvedLevel } from "@johnmorrisdotca/suido/levels";

console.log(firstUnsolvedLevel(256,new Set([1,2])));
3

What it prints (run when this page was built)

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