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

Colour Chains

import { … } from "@johnmorrisdotca/houseki/colour-chains";

75.9 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.
actionsForTickfunctionResolves this tick's inputs in lateral, rotation, drop, soft-drop, pause order.
advanceTicksfunctionAdvances deterministic 60 Hz simulation and resolution; Relaxed and Challenges do not force a falling clock.
applyActionfunctionApplies one immutable accepted action and records its logical-tick position.
applyScheduledActionsfunctionApplies a scheduler batch until the pair locks or the run pauses; accepted actions are recorded by the engine.
arashiCampaignManifestconstantThe ordered native campaign, its generation/grading revisions, checksum and measured levels.
arashiLevelManifestconstantThe frozen ordered native levels; array indices start at zero and display numbers start at one.
campaignManifestconstantThe frozen native campaign manifest with its ordering, revisions, checksum and measured levels.
CelltypeA visible or hidden board coordinate.
ChainCampaignLeveltypeOne authored native challenge with its stable id, setup, winning witness, measurements and review status.
ChainCampaignManifesttypeThe ordered native campaign, its generation/grading revisions, checksum and measured levels.
ChainContentDatatypeThe stored native Colour Chains campaign, lessons and optional Shizen/Arashi campaigns.
ChainDifficultyMetricstypeThe bounded engine measurements used to grade this campaign; they do not claim human difficulty.
ChainsPowerDropPreviewtypeThe Shizen hard-drop preview: the one-step rebound and where the pair locks (finalCells), and where each stone of the pair comes to rest once the committed drop's gravity has run (settledCells).
ChainTutorialDefinitiontypeOne bilingual native lesson with its authored setup, teaching steps and winning witness.
ChainTutorialSteptypeOne bilingual native lesson instruction and the corresponding action or tick step.
ChallengeGemtypeAuthored challenge layouts can include explicit Shizen-marked stones.
ChallengeGoaltypeChallenge objective; target IDs refer to the visible starting board.
ChallengeOptionstypeAuthored challenge inputs including the starting board, finite goal and supplied witness.
ColourtypeA gem colour used by Colour Chains.
createArashiLevelfunctionCreate a validated native Arashi challenge using its stored setup and winning witness.
createChallengefunctionValidates and creates a finite witnessed challenge.
createGamefunctionCreates a deterministic seeded game with one active pair and three previews.
createInputSchedulerfunctionCreates an empty held-input scheduler.
createLevelfunctionCreate a fresh engine-validated challenge from a stable content ID or display number.
CreateOptionstypeCreation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
createShizenLevelfunctionCreate a validated native Shizen challenge using its stored setup and winning witness.
decodeGamefunctionReconstructs a bounded action replay and rejects any checkpoint that differs from replay.
encodeGamefunctionEncodes canonical initial settings, accepted ordinal actions and a derived checkpoint.
GameEventtypeA domain event emitted by one transition.
GameStatetypeAn immutable Colour Chains rules state.
GameStatustypeCompact player status derived from the current state.
GemtypeA settled or active stone with a stable run-local identity.
getArashiLevelfunctionFind a native Arashi challenge by stable id or one-based display number.
getLevelfunctionFind a campaign challenge by stable content ID or its current one-based number.
getShizenLevelfunctionFind a native Shizen challenge by stable id or one-based display number.
getTutorialfunctionFind a persistent interactive lesson by its stable ID.
HeldControltypeA lateral or soft-drop control which the input scheduler can repeat.
InputCommandtypeA native held-control change or one-shot edge command for Colour Chains.
LandingtypeDestination cells for the two independently settled ghost stones.
landingCellsfunctionReturns the exact independent landing cells for the current rigid pair without consuming random values.
legalActionsfunctionLists only actions accepted by the current game state.
levelManifestconstantThe frozen ordered native levels; array indices start at zero and display numbers start at one.
LocalizedTexttypeOne authored text in English and Japanese.
ModetypeThe native game mode; authored challenges have fixed setup and queue rules.
NatureCampaignBandtypeAn inclusive one-based range in a measured native nature-campaign difficulty band.
NatureChainCampaignLeveltypeOne authored native challenge with its stable id, setup, winning witness, measurements and review status.
NatureChainCampaignManifesttypeThe ordered native campaign, its generation/grading revisions, checksum and measured levels.
OrientationtypeThe pivot-to-satellite direction, in clockwise order.
PairtypeThe active rigid pair.
PhasetypeObservable game phases.
PlayActiontypeOne native Colour Chains player command, including pause and hint commands.
powerDropPreviewfunctionReturns the Shizen hard-drop landing and one-step rebound preview without changing state.
PresettypeSupported well presets.
processInputTickfunctionApplies a complete deterministic held-input and simulation tick, releasing controls on lock or resolution.
queueInputEdgefunctionQueues a one-shot rotation, drop, Place, pause or resume edge for the next logical tick.
RecordedActiontypeA native action recording with the logical position needed for deterministic replay.
releaseAllInputfunctionReleases every held or queued control after focus loss, lock, resolution or pause.
restartGamefunctionRestarts the same seed/date or original witnessed challenge board and queue.
setHeldInputfunctionStarts or releases one held control.
SettingstypeRun settings fixed at game creation.
shizenCampaignManifestconstantThe ordered native campaign, its generation/grading revisions, checksum and measured levels.
shizenLevelManifestconstantThe frozen ordered native levels; array indices start at zero and display numbers start at one.
statusOffunctionReturns score, mode, chain and completion fields derived from state.
StoneChainsOptionsErrorclassTyped setup and authored challenge error.
TransitiontypeA deterministic transition; rejected actions retain the exact input state.
tutorialManifestconstantThe frozen native bilingual lessons and their authored teaching steps.
WavetypeA scored simultaneous match wave.
WeatherScheduletypeThe native frequent or rare weather schedule for Colour Chains.
WitnessSteptypeOne witnessed Colour Chains pair placement using pivot column and orientation.

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