本文へ移動

Houseki宝石

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

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

目次

リファレンス

ストーンコラプス

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

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

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

エクスポート

名前種類概要
Action型A native player action accepted or rejected according to the current phase and rules.
advanceTicks関数Advances the observable 7/6/9 tick removal and gravity stages, bounded to 3600 ticks.
applyAction関数Applies a selection, confirmation, or cancellation without mutating its input.
BoardPreset型A named native board geometry; custom dimensions remain a separate option.
BoardShape型A native shaped active-cell layout applied to the row-major board.
campaignManifest定数The frozen native campaign manifest with its ordering, revisions, checksum and measured levels.
ChallengeDefinition型A validated Stone Collapse authored setup and stable-id group witness.
ChallengeGoal型A native authored challenge objective; its discriminant selects target, chain, empty-board or score requirements.
ChallengeOptions型Authored challenge inputs including the starting board, finite goal and supplied witness.
CollapseCampaignLevel型One authored native challenge with its stable id, setup, winning witness, measurements and review status.
CollapseCampaignManifest型The ordered native campaign, its generation/grading revisions, checksum and measured levels.
CollapseDifficultyMetrics型The bounded engine measurements used to grade this campaign; they do not claim human difficulty.
CollapseTutorialDefinition型One bilingual native lesson with its authored setup, teaching steps and winning witness.
CollapseTutorialStep型One bilingual native lesson instruction and the corresponding action or tick step.
createChallenge関数Creates a fixed witnessed challenge after validating its board, objective, move budget, and every witness group.
createGame関数Creates a seeded full board; an all-singleton draw retries before using a checked adjacent pair.
createLevel関数Construct a fresh engine-validated challenge from a content ID or display number.
CreateOptions型Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
decodeGame関数Reconstructs and validates a bounded replay before accepting its checkpoint.
encodeGame関数Encodes the canonical initial configuration, accepted replay actions, and a derived checkpoint.
GameEvent型An event emitted by one native transition; type selects the event’s additional fields.
GameMode型The native free, timed, daily or authored-challenge game mode.
GamePhase型The native ready, resolution and ending phases.
GameState型The immutable authoritative native game state, including its board, random state and recording.
GameStatus型A compact native status derived from the authoritative state for a host’s labels.
getLevel関数Find a challenge by its persistent content ID or current one-based display number.
getTutorial関数Find a persistent interactive lesson by its stable ID.
legalActions関数Lists every selection and confirmation currently accepted by the rules.
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.
RecordedAction型A native action recording with the logical position needed for deterministic replay.
requestHint関数Selects the next supplied witness group only while the run still matches its path; accepted hints mark the run assisted.
restartGame関数Starts a fresh attempt from the identical seeded board or preserved challenge definition.
Settings型Validated settings fixed at native game creation.
statusOf関数Returns the stable public game status and the remaining-stone count.
Stone型A stone keeps its run-local identity as it falls or changes column.
StoneCollapseOptionsErrorクラスTyped public-settings validation error.
StoneColour型A colour used by a stone.
StoredTool型A stored Stone Collapse tool selected from the native Bomb and Pick tray.
ToolInventory型The native remaining counts of stored tools.
Transition型The resulting native state, emitted events and acceptance decision; rejected actions preserve the input.
tutorialManifest定数The frozen native bilingual lessons and their authored teaching steps.
undo関数Restores the full pre-move state in Relaxed or Challenge practice and permanently marks the attempt assisted.
UndoFrame型Data sufficient to restore the complete game immediately before a committed move.

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

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