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

nextLevelfunction

The level to open on in a set of count: the first open one not yet solved, or the last open one when every open level is solved.

Import it

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

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

Definition

function nextLevel(count: number, solved: ReadonlySet<number>): number

Parameters

NameTypeDescription
countnumber

The total number of levels.

solvedReadonlySet<number>

The set of solved one-based level numbers.

Returns

number

The level to open on in a set of count: the first open one not yet solved, or the last open one when every open level is solved.

Examples

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

console.log(nextLevel(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.