بنقرة واحدة
game-completion
Wire up game completion signaling to the Puzzmo host
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Wire up game completion signaling to the Puzzmo host
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Create app metadata, thumbnail, and offline configuration for the Puzzmo platform
Integrate the Puzzmo SDK into a Vite game project for host communication
Configure the Puzzmo CLI for uploading game builds
Edit the `integrations` block in puzzmo.json (leaderboards, notables, etc.) using live game context from the dev.puzzmo.com MCP
Add integrations to puzzmo.json with leaderboard configuration using deeds
Convert hardcoded colors to use Puzzmo theme tokens for light/dark mode support
| name | game-completion |
| description | Wire up game completion signaling to the Puzzmo host |
Add proper game completion signaling so Puzzmo knows when the player has finished.
Find the game's win condition / completion check.
When the game is won, call sdk.gameCompleted() with the result:
sdk.gameCompleted({
boardState: encodeState(state), // required: the final encoded game state
pointsAwarded: calculateScore(),
completed: true,
})
Omit elapsedTimeSecs and additionalTimeAddedSecs — the SDK fills them from its internal timer. Per-game stats (hints used, moves, etc.) are sent as deeds via the second argument, see the add-deeds skill.
After any victory animation completes, call sdk.showCompletionScreen():
sdk.showCompletionScreen(
[{ type: "md", text: "**Congratulations!** You solved the puzzle!" }],
{
boardState: encodeState(state),
pointsAwarded: calculateScore(),
elapsedTimeSecs: sdk.timer.timeSecs(),
additionalTimeAddedSecs: sdk.timer.addedTimeSecs(),
},
true, // showRetry
)
Make sure gameCompleted is called BEFORE showCompletionScreen. The host processes the completion data first, then displays the completion UI.
The timer automatically stops when gameCompleted is called - you don't need to stop it manually.
build script completes without errorsgameCompleted fires with score datashowCompletionScreen fires