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

Stone Collapse

import { … } from "@johnmorrisdotca/houseki/stone-collapse";

32.5 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
ActiontypeA native player action accepted or rejected according to the current phase and rules.
advanceTicksfunctionAdvances the observable 7/6/9 tick removal and gravity stages, bounded to 3600 ticks.
applyActionfunctionApplies a selection, confirmation, or cancellation without mutating its input.
BoardPresettypeA named native board geometry; custom dimensions remain a separate option.
BoardShapetypeA native shaped active-cell layout applied to the row-major board.
campaignManifestconstantThe frozen native campaign manifest with its ordering, revisions, checksum and measured levels.
ChallengeDefinitiontypeA validated Stone Collapse authored setup and stable-id group witness.
ChallengeGoaltypeA native authored challenge objective; its discriminant selects target, chain, empty-board or score requirements.
ChallengeOptionstypeAuthored challenge inputs including the starting board, finite goal and supplied witness.
CollapseCampaignLeveltypeOne authored native challenge with its stable id, setup, winning witness, measurements and review status.
CollapseCampaignManifesttypeThe ordered native campaign, its generation/grading revisions, checksum and measured levels.
CollapseDifficultyMetricstypeThe bounded engine measurements used to grade this campaign; they do not claim human difficulty.
CollapseTutorialDefinitiontypeOne bilingual native lesson with its authored setup, teaching steps and winning witness.
CollapseTutorialSteptypeOne bilingual native lesson instruction and the corresponding action or tick step.
createChallengefunctionCreates a fixed witnessed challenge after validating its board, objective, move budget, and every witness group.
createGamefunctionCreates a seeded full board; an all-singleton draw retries before using a checked adjacent pair.
createLevelfunctionConstruct a fresh engine-validated challenge from a content ID or display number.
CreateOptionstypeCreation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
decodeGamefunctionReconstructs and validates a bounded replay before accepting its checkpoint.
encodeGamefunctionEncodes the canonical initial configuration, accepted replay actions, and a derived checkpoint.
GameEventtypeAn event emitted by one native transition; type selects the event’s additional fields.
GameModetypeThe native free, timed, daily or authored-challenge game mode.
GamePhasetypeThe native ready, resolution and ending phases.
GameStatetypeThe immutable authoritative native game state, including its board, random state and recording.
GameStatustypeA compact native status derived from the authoritative state for a host’s labels.
getLevelfunctionFind a challenge by its persistent content ID or current one-based display number.
getTutorialfunctionFind a persistent interactive lesson by its stable ID.
legalActionsfunctionLists every selection and confirmation currently accepted by the rules.
levelManifestconstantThe frozen ordered native levels; array indices start at zero and display numbers start at one.
LocalizedTexttypeOne authored text in English and Japanese.
RecordedActiontypeA native action recording with the logical position needed for deterministic replay.
requestHintfunctionSelects the next supplied witness group only while the run still matches its path; accepted hints mark the run assisted.
restartGamefunctionStarts a fresh attempt from the identical seeded board or preserved challenge definition.
SettingstypeValidated settings fixed at native game creation.
statusOffunctionReturns the stable public game status and the remaining-stone count.
StonetypeA stone keeps its run-local identity as it falls or changes column.
StoneCollapseOptionsErrorclassTyped public-settings validation error.
StoneColourtypeA colour used by a stone.
StoredTooltypeA stored Stone Collapse tool selected from the native Bomb and Pick tray.
ToolInventorytypeThe native remaining counts of stored tools.
TransitiontypeThe resulting native state, emitted events and acceptance decision; rejected actions preserve the input.
tutorialManifestconstantThe frozen native bilingual lessons and their authored teaching steps.
undofunctionRestores the full pre-move state in Relaxed or Challenge practice and permanently marks the attempt assisted.
UndoFrametypeData sufficient to restore the complete game immediately before a committed move.

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