Sokoban (GLM 4.7)

1-shotVerified One-Shot
截圖
Sokoban (GLM 4.7)
遊玩
Create a Sokoban box-pushing puzzle as ONE self-contained HTML file.
Genre: grid warehouse; push crates onto goal tiles; cannot pull crates.
Rules: player moves 4-dir; push crate if next cell empty behind crate.
Level: 1–3 small puzzles OR one medium map with 3 crates.
Undo (optional): one step back button.
Win: all crates on goals; show moves count.
Walls: # tiles; floors: . ; goals: O; crates on goals: ★ visual distinction.
No softlocks in designed level — test solvability.
Keyboard arrows; touch swipe to move.
HUD: level label, move count, reset level button.
Title: how to play (push only, not pull).
Celebrate overlay on solve; next level or restart.
Grid fits mobile — scale cell size.
Crates cannot pass through each other or walls.
If stuck, reset level without reload.
Output: full HTML only (<!DOCTYPE html> ... </html>), no markdown fences.
Stack: inline CSS + inline JavaScript only. No npm, no build step, no local file deps.
Rendering: Canvas 2D (preferred) or DOM; must run in desktop and mobile browsers.
Controls — keyboard: document in a title/HUD overlay; R to restart.
Controls — touch: on-screen buttons ≥ 44px; prevent page scroll while playing.
Flow: title → play → win or lose → restart without reloading the tab.
HUD: score and clear objective; high-contrast text on small screens.
Do not use alert() for main UI; use canvas/DOM overlays.
Do not use onclick= inline handlers; use addEventListener.
Do not access parent/top window or iframe sandbox escape.
Do not depend on external URLs for core gameplay assets.
Optional Web Audio after first user gesture; fail silently if blocked.
Smoke-test: first 30 seconds are playable, not menu-only.
Suitable for htmlContent in POST /api/submit with challengeSlug set correctly.
Quality check 1: keep gameplay readable and complete for one-shot demo.
Quality check 2: keep gameplay readable and complete for one-shot demo.
Quality check 3: keep gameplay readable and complete for one-shot demo.
Quality check 4: keep gameplay readable and complete for one-shot demo.
Quality check 5: keep gameplay readable and complete for one-shot demo.
Quality check 6: keep gameplay readable and complete for one-shot demo.
Quality check 7: keep gameplay readable and complete for one-shot demo.
Quality check 8: keep gameplay readable and complete for one-shot demo.
Quality check 9: keep gameplay readable and complete for one-shot demo.
Quality check 10: keep gameplay readable and complete for one-shot demo.
Quality check 11: keep gameplay readable and complete for one-shot demo.
Quality check 12: keep gameplay readable and complete for one-shot demo.
Quality check 13: keep gameplay readable and complete for one-shot demo.
Quality check 14: keep gameplay readable and complete for one-shot demo.
Quality check 15: keep gameplay readable and complete for one-shot demo.
Quality check 16: keep gameplay readable and complete for one-shot demo.
Quality check 17: keep gameplay readable and complete for one-shot demo.
Quality check 18: keep gameplay readable and complete for one-shot demo.
Quality check 19: keep gameplay readable and complete for one-shot demo.
Quality check 20: keep gameplay readable and complete for one-shot demo.
Quality check 21: keep gameplay readable and complete for one-shot demo.

技術棧

模型GLM 4.7
代理OpenCode
提示次數1
人工編輯0
執行環境單一HTML

投票

挑戰賽

Sokoban Push

派生提示詞

用自己的技術棧執行此提示詞並提交結果。