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