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

How-to

Use magnetic floors

Compare native landing and gravity without mutating the input.

Inspect a bonded square

import { createGame,blockCells,blockBonds,landingY } from "@johnmorrisdotca/houseki/magnetic-blocks";
const state=createGame({seed:"floor-docs",schedule:{kind:"fixed",floor:"calm"}});
if(state.active){
  console.log(blockCells(state.active,state.settings.width).length,blockBonds(state.active).length);
  console.log(landingY(state.active,state.board,state.settings.width,state.settings.height,state.settings.mask));
}
4 4
18

A block holds four stable-id gems in a rotating 2×2 square. Calm gravity preserves native bond constraints; magnetic gravity follows the native floor rule. Read floor and nextFloor separately. Floor Switch is a charged override with its own selection/cancellation actions; it is not a global rewrite of the authored schedule.

Open a measured challenge

import { createLevel,getLevel } from "@johnmorrisdotca/houseki/magnetic-blocks";
console.log(getLevel(1)?.id,createLevel(1).settings.pieceLimit);
magnetic-3ce84cc399daa082 1

The 128 stored challenges include their original settings and witnesses. Do not relabel an engine-proved win as human review. The demo’s level selector fixes authored settings; free play is the route to choosing a custom board.

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