Skip to the content

Houseki宝石

Run five native gem and stone engines, play measured challenges and lessons, and save deterministic games.

Houseki (宝石) is Japanese for a gem or precious stone. About the name

Contents

Reference · Magnetic Blocks

createLessonfunction

Creates a fresh lesson game with its authored setup and queue.

Import it

import { createLesson } from "@johnmorrisdotca/houseki/magnetic-blocks";

Definition

function createLesson(id: string): GameState

Parameters

NameTypeDescription
idstring

A stable content id, or the one-based display number when numbers are accepted.

Returns

GameState

Creates a fresh lesson game with its authored setup and queue.

Examples

import { createLesson, lessonManifest } from "@johnmorrisdotca/houseki/magnetic-blocks";

console.log(createLesson(lessonManifest[0].id).phase);
falling

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/houseki 0.4.2.