createLevelfunction
Makes a level's game; throws for a level that does not exist.
Import it
import { createLevel } from "@johnmorrisdotca/houseki/tsumiki";
Definition
function createLevel(idOrNumber: string | number): GameState
Parameters
| Name | Type | Description |
|---|---|---|
idOrNumber | string | number | A level's id or display number. |
Returns
GameState
A new game of that level. Throws where there is no such level.
Examples
import { createLevel } from "@johnmorrisdotca/houseki/tsumiki";
console.log(createLevel(1).settings.mode);challengeWhat it prints (run when this page was built)