リファレンス
ストーンコラプス
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. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。