Reference · Load level collections
openTsunagiLevelsfunction
The levels that are open, 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 { openTsunagiLevels } from "@johnmorrisdotca/tsunagi/levels";
Also exported from: @johnmorrisdotca/tsunagi
Definition
function openTsunagiLevels(size: number, solved: ReadonlySet<number>, set?: TsunagiSet): number
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
solved | ReadonlySet<number> | Solved level numbers, or the solver metrics specified by this signature. |
set (optional) | TsunagiSet | The native level set or palette specified by the signature. |
Returns
number
The levels that are open, 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 { openTsunagiLevels } from "@johnmorrisdotca/tsunagi/levels";
console.log(openTsunagiLevels(4,new Set([1,2])));16What it prints (run when this page was built)