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

openLevelsfunction

The levels that are open of a set of count levels, given the ones solved: the first block of sixteen always, and each block after it once every level of the block before is solved.

Import it

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

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

Definition

function openLevels(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 levels that are open of a set of count levels, given the ones solved: the first block of sixteen always, and each block after it once every level of the block before is solved.

Examples

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

console.log(openLevels(256,new Set([1,2])));
16

What it prints (run when this page was built)

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