hundredblockdash-map-editor

Hundred Block Dash: map editor

Place, move, turn and resize everything that stands on the game’s two boards over the real board, then hand the layout to the game:

Open the editor: https://claude.ai/artifact/NuwJ1mBP2ZaybkCrjZsU7Z. It’s a private claude.ai page, built for iPad and usable in any browser.

The game is Claws02/HundredBlockDash. Its automatic plot placement put buildings on top of each other and into the spaces; on that layout the editor counts 31 buildings in conflict. This repo is the tool that puts a person in charge of placement. The game only reads the result.

How the pieces fit

game/src/engine/CityKit.js ──(verbatim, at build)──► editor page ──Save for Claude──► the page's store
            ▲                                                                              │
     the game builds every                                                        read by Claude
     model from this file                                                                  ▼
            └──── game/src/config/layouts/city_circuit.js ◄── game/scripts/apply-layout.js (validates)

Using the editor

Working on the editor

git clone --recurse-submodules https://github.com/Claws02/hundredblockdash-map-editor
npm install && npx playwright install chromium      # for export-ref and test only
npm run build          # → dist/city-map-editor.html (republish it to the editor's URL)
npm test               # the built page end to end, both maps: drag, inspector, undo, library, 3D, save
npm run export-ref     # re-capture ref/ from the game, when spaces, roads or ground change
File What it is
editor.html The editor’s source: markup, styles and code, with markers the build fills
scripts/build.js Inlines game/src/engine/CityKit.js, ref/, the game’s current layout and the game commit into one page
scripts/export-reference.js Serves game/, boots each map, and writes ref/city_circuit.json (spaces, roads) with a straight-down ground image, and ref/hundred_block_dash.json (the path, the realm of every block for each run length, realm colours)
ref/ The boards underneath: City Circuit’s ground that never moves (image), and what the editor draws itself (JSON)
test/editor.test.js Drives the built page in Chromium, framed the way claude.ai frames it, against an in-memory store; the saved Hundred Block Dash layout goes through the game’s own apply-layout.js checker

Keeping in step with the game

When the game’s models or layout change (a new model batch, or a pulled layout committed to the game), move the submodule and rebuild:

git -C game fetch && git -C game checkout <game commit>
npm run build && npm test
git commit -am "Editor: models from game <commit>"

Then republish dist/city-map-editor.html to the editor’s URL; saved layouts and versions stay in the page’s store. Keep the game’s MODELS keys stable: saved layouts name models by key, and the game’s validator refuses unknown ones.

Not in this version