Reference · Load level collections
tsunagiLevelsOffunction
A size already loaded in a set, or a refusal: nothing answers for a list it does not have.
Import it
import { tsunagiLevelsOf } from "@johnmorrisdotca/tsunagi/levels";
Definition
function tsunagiLevelsOf(size: number, set?: TsunagiSet): readonly LevelRow[]
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
set (optional) | TsunagiSet | The native level set or palette specified by the signature. |
Returns
readonly LevelRow[]
A size already loaded in a set, or a refusal: nothing answers for a list it does not have.
Examples
import { loadTsunagiLevels, tsunagiLevelsOf } from "@johnmorrisdotca/tsunagi/levels";
await loadTsunagiLevels(4);
console.log(tsunagiLevelsOf(4).length);192What it prints (run when this page was built)