リファレンス
三つの宝石
import { … } from "@johnmorrisdotca/houseki/falling-triplets";
最小化と gzip 圧縮をしたサイズは 21.8 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
Action | 型 | A native player action accepted or rejected according to the current phase and rules. |
actionsForTick | 関数 | Resolves canonical actions in the design's per-tick order. |
advanceTicks | 関数 | Advances fixed 60 Hz game ticks. |
applyAction | 関数 | Applies and records one immutable action; rejected actions preserve state identity. |
CampaignLevel | 型 | One authored native challenge with its stable id, setup, winning witness, measurements and review status. |
campaignManifest | 定数 | The frozen native campaign manifest with its ordering, revisions, checksum and measured levels. |
CampaignManifest | 型 | The ordered native campaign, its generation/grading revisions, checksum and measured levels. |
ChallengeGoal | 型 | A native authored challenge objective; its discriminant selects target, chain, empty-board or score requirements. |
ChallengeGoalChain | 型 | A Falling Triplets objective requiring at least the supplied chain depth. |
ChallengeGoalEmpty | 型 | A Falling Triplets objective requiring an empty board. |
ChallengeGoalTargets | 型 | A Falling Triplets objective requiring the supplied stable target ids to be cleared. |
ChallengeHint | 型 | One witnessed Falling Triplets placement with a column and cycle orientation. |
ChallengeOptions | 型 | Authored challenge inputs including the starting board, finite goal and supplied witness. |
ChallengeSettings | 型 | The fixed Falling Triplets challenge settings with the original board and finite triplet queue. |
Colour | 型 | A gem colour ID. |
compactBoard | 関数 | Compacts each column downward while preserving the top-to-bottom order of survivors. |
createChallenge | 関数 | Creates a challenge after validating its authored board, finite queue, goal, and witness. |
createGame | 関数 | Creates a deterministic empty game with an active piece and three-piece preview. |
createInputScheduler | 関数 | Creates an empty fixed-tick input scheduler state. |
createLevel | 関数 | Construct a fresh validated challenge state for a stable level ID or display number. |
CreateOptions | 型 | Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together. |
decodeGame | 関数 | Replays and validates a bounded save, then verifies its checkpoint against the derived state. |
DifficultyMetrics | 型 | The bounded engine measurements used to grade this campaign; they do not claim human difficulty. |
encodeGame | 関数 | Encodes the authoritative settings, action recording, and derived checkpoint. |
findMatches | 関数 | Finds the union of every maximal horizontal, vertical, and diagonal run of at least three. |
GameEvent | 型 | An event emitted by one native transition; type selects the event’s additional fields. |
GameState | 型 | The immutable authoritative native game state, including its board, random state and recording. |
Gem | 型 | A settled or active gem with a stable run-local identity. |
getLevel | 関数 | Find a level by stable content ID or its current one-based display number. |
getTutorial | 関数 | Find a lesson by its persistent ID. |
landingY | 関数 | Returns the exact landing row for the current rigid triplet. |
legalActions | 関数 | Lists the core actions currently available to the player. |
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. |
nextInt | 関数 | Draws an unbiased integer and updated state using rejection sampling. |
nextUint32 | 関数 | Advances the reference xorshift32 source. |
Phase | 型 | The native falling, resolution, pause and ending phases. |
Piece | 型 | The native falling triplet with stable gem ids, orientation, descent and lock counters. |
queueInputEdge | 関数 | Queues a one-shot cycle, drop, or pause edge for the next logical tick. |
RecordedAction | 型 | One accepted canonical action and its logical tick position. |
releaseAllActions | 関数 | Releases every held action after blur, pause, or pointer cancellation. |
restartGame | 関数 | Recreates the same authored mode, seed, and challenge configuration from its original setup. |
seedState | 関数 | Hashes a string seed with UTF-8 FNV-1a and returns a nonzero uint32 state. |
setHeldAction | 関数 | Starts or releases one held action; opposite lateral holds cancel during scheduling. |
Settings | 型 | Validated settings fixed at native game creation. |
statusOf | 関数 | Returns a plain status summary suitable for UI labels. |
Transition | 型 | The resulting native state, emitted events and acceptance decision; rejected actions preserve the input. |
Triplet | 型 | Three ordered gem colours composing one falling triplet. |
TutorialDefinition | 型 | One bilingual native lesson with its authored setup, teaching steps and winning witness. |
tutorialManifest | 定数 | The frozen native bilingual lessons and their authored teaching steps. |
TutorialStep | 型 | One bilingual native lesson instruction and the corresponding action or tick step. |
Wave | 型 | One simultaneous native match wave, its cleared cells and chain score. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。