Build a tiny offline roguelike https://patrickz.ai/learn/offline-roguelike/ OUTCOME Finish a one-room game with save, reload and a deliberate offline test. YOU NEED A coding agent, browser and basic comfort running a local development command. 1. Define the practice version Use an original grid and placeholder art. Implement move, wait, one enemy and an exit before procedural generation. 2. Build step 1 Create one room, one player, and one monster. 3. Build step 2 Represent the world as a grid before adding graphics. 4. Build step 3 Make movement and combat deterministic enough to test. 5. Build step 4 Add inventory and save data only after the core loop is fun. 6. Build step 5 Add touch buttons that call the same commands as the keyboard. 7. Build step 6 Add the PWA manifest and service worker last. 8. Run the experiment Start a run, move twice, save, reload and confirm the same state. After the production app has cached successfully, disconnect and reopen the exact same origin. PROMPT Work in a disposable practice project. Explain any setup requirements before changing files. Build one small step at a time and show how I can check it. I am building a grid-based browser roguelike in JavaScript. Design the smallest playable loop with one room, one enemy, one weapon, and one win condition. Separate game state from rendering. Give me a file map, state schema, and five automated tests. Do not add procedural generation yet. Review this input system. Keyboard, touch, and controller must all call the same game commands. Identify duplicated logic and propose a command-based interface with examples for move, wait, pick up, open inventory, and cast spell. My first-version boundary: Use an original grid and placeholder art. Implement move, wait, one enemy and an exit before procedural generation. EXAMPLE / EXPERIMENT Start a run, move twice, save, reload and confirm the same state. After the production app has cached successfully, disconnect and reopen the exact same origin. CHECK YOUR RESULT [ ] Movement and turn rules are deterministic. [ ] Reload restores the saved room and player state. [ ] Offline behavior is tested after a successful online load. IF IT FAILS A service worker does not make an unvisited site available offline. Test the production build on the same host and record which assets were cached. MY RESULT / NEXT CHANGE