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
| Name | Type | Description |
|---|---|---|
count | number | The total number of levels. |
solved | ReadonlySet<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])));3What it prints (run when this page was built)