本文へ移動

Houseki宝石

5つの宝石と石のゲームの仕組みを使い、測定したチャレンジやレッスンで遊び、再現できるゲームを保存できます。

宝石(ほうせき)は、宝石や貴石を意味する日本語です。 名前について(英語)

目次

リファレンス

色の連鎖

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

最小化と gzip 圧縮をしたサイズは 75.9 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
Action型A native player action accepted or rejected according to the current phase and rules.
actionsForTick関数Resolves this tick's inputs in lateral, rotation, drop, soft-drop, pause order.
advanceTicks関数Advances deterministic 60 Hz simulation and resolution; Relaxed and Challenges do not force a falling clock.
applyAction関数Applies one immutable accepted action and records its logical-tick position.
applyScheduledActions関数Applies a scheduler batch until the pair locks or the run pauses; accepted actions are recorded by the engine.
arashiCampaignManifest定数The ordered native campaign, its generation/grading revisions, checksum and measured levels.
arashiLevelManifest定数The frozen ordered native levels; array indices start at zero and display numbers start at one.
campaignManifest定数The frozen native campaign manifest with its ordering, revisions, checksum and measured levels.
Cell型A visible or hidden board coordinate.
ChainCampaignLevel型One authored native challenge with its stable id, setup, winning witness, measurements and review status.
ChainCampaignManifest型The ordered native campaign, its generation/grading revisions, checksum and measured levels.
ChainContentData型The stored native Colour Chains campaign, lessons and optional Shizen/Arashi campaigns.
ChainDifficultyMetrics型The bounded engine measurements used to grade this campaign; they do not claim human difficulty.
ChainsPowerDropPreview型The 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).
ChainTutorialDefinition型One bilingual native lesson with its authored setup, teaching steps and winning witness.
ChainTutorialStep型One bilingual native lesson instruction and the corresponding action or tick step.
ChallengeGem型Authored challenge layouts can include explicit Shizen-marked stones.
ChallengeGoal型Challenge objective; target IDs refer to the visible starting board.
ChallengeOptions型Authored challenge inputs including the starting board, finite goal and supplied witness.
Colour型A gem colour used by Colour Chains.
createArashiLevel関数Create a validated native Arashi challenge using its stored setup and winning witness.
createChallenge関数Validates and creates a finite witnessed challenge.
createGame関数Creates a deterministic seeded game with one active pair and three previews.
createInputScheduler関数Creates an empty held-input scheduler.
createLevel関数Create a fresh engine-validated challenge from a stable content ID or display number.
CreateOptions型Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
createShizenLevel関数Create a validated native Shizen challenge using its stored setup and winning witness.
decodeGame関数Reconstructs a bounded action replay and rejects any checkpoint that differs from replay.
encodeGame関数Encodes canonical initial settings, accepted ordinal actions and a derived checkpoint.
GameEvent型A domain event emitted by one transition.
GameState型An immutable Colour Chains rules state.
GameStatus型Compact player status derived from the current state.
Gem型A settled or active stone with a stable run-local identity.
getArashiLevel関数Find a native Arashi challenge by stable id or one-based display number.
getLevel関数Find a campaign challenge by stable content ID or its current one-based number.
getShizenLevel関数Find a native Shizen challenge by stable id or one-based display number.
getTutorial関数Find a persistent interactive lesson by its stable ID.
HeldControl型A lateral or soft-drop control which the input scheduler can repeat.
InputCommand型A native held-control change or one-shot edge command for Colour Chains.
Landing型Destination cells for the two independently settled ghost stones.
landingCells関数Returns the exact independent landing cells for the current rigid pair without consuming random values.
legalActions関数Lists only actions accepted by the current game state.
levelManifest定数The frozen ordered native levels; array indices start at zero and display numbers start at one.
LocalizedText型One authored text in English and Japanese.
Mode型The native game mode; authored challenges have fixed setup and queue rules.
NatureCampaignBand型An inclusive one-based range in a measured native nature-campaign difficulty band.
NatureChainCampaignLevel型One authored native challenge with its stable id, setup, winning witness, measurements and review status.
NatureChainCampaignManifest型The ordered native campaign, its generation/grading revisions, checksum and measured levels.
Orientation型The pivot-to-satellite direction, in clockwise order.
Pair型The active rigid pair.
Phase型Observable game phases.
PlayAction型One native Colour Chains player command, including pause and hint commands.
powerDropPreview関数Returns the Shizen hard-drop landing and one-step rebound preview without changing state.
Preset型Supported well presets.
processInputTick関数Applies a complete deterministic held-input and simulation tick, releasing controls on lock or resolution.
queueInputEdge関数Queues a one-shot rotation, drop, Place, pause or resume edge for the next logical tick.
RecordedAction型A native action recording with the logical position needed for deterministic replay.
releaseAllInput関数Releases every held or queued control after focus loss, lock, resolution or pause.
restartGame関数Restarts the same seed/date or original witnessed challenge board and queue.
setHeldInput関数Starts or releases one held control.
Settings型Run settings fixed at game creation.
shizenCampaignManifest定数The ordered native campaign, its generation/grading revisions, checksum and measured levels.
shizenLevelManifest定数The frozen ordered native levels; array indices start at zero and display numbers start at one.
statusOf関数Returns score, mode, chain and completion fields derived from state.
StoneChainsOptionsErrorクラスTyped setup and authored challenge error.
Transition型A deterministic transition; rejected actions retain the exact input state.
tutorialManifest定数The frozen native bilingual lessons and their authored teaching steps.
Wave型A scored simultaneous match wave.
WeatherSchedule型The native frequent or rare weather schedule for Colour Chains.
WitnessStep型One witnessed Colour Chains pair placement using pivot column and orientation.

ソースを見るGitHub で編集@johnmorrisdotca/houseki 0.4.2 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。