Reference · Load level collections
isTsunagiLevelfunction
Whether a number is a level this size has.
Import it
import { isTsunagiLevel } from "@johnmorrisdotca/tsunagi/levels";
Also exported from: @johnmorrisdotca/tsunagi
Definition
function isTsunagiLevel(size: number, level: number, set?: TsunagiSet): boolean
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
level | number | The one-based level number. |
set (optional) | TsunagiSet | The native level set or palette specified by the signature. |
Returns
boolean
Whether a number is a level this size has.
Examples
import { isTsunagiLevel } from "@johnmorrisdotca/tsunagi/levels";
console.log(isTsunagiLevel(4,1));trueWhat it prints (run when this page was built)