本文へ移動

Houseki宝石

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

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

目次

リファレンス

三つの宝石

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.

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

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