createLevelfunction
Creates a fresh game with the authored rules, board, queue, and finite move budget.
Import it
import { createLevel } from "@johnmorrisdotca/houseki/magnetic-blocks";
Definition
function createLevel(id: string | number): GameState
Parameters
| Name | Type | Description |
|---|---|---|
id | string | number | A stable content id, or the one-based display number when numbers are accepted. |
Returns
GameState
Creates a fresh game with the authored rules, board, queue, and finite move budget.
Examples
import { createLevel } from "@johnmorrisdotca/houseki/magnetic-blocks";
console.log(createLevel(1).phase);fallingWhat it prints (run when this page was built)