diff --git a/README.md b/README.md index c9cbda7..97b6ec5 100644 --- a/README.md +++ b/README.md @@ -104,13 +104,22 @@ This game is a **decision simulator** for our actual work. ## Files -- `index.html` — Game UI -- `game.js` — Core engine (tick loop, buildings, projects, events) +- `index.html` — Game UI (entry point) +- `js/main.js` — Bootstrap: binds UI, starts the tick loop +- `js/engine.js` — Core engine (tick loop, buildings, projects, events) +- `js/data.js` — Game data, constants, and configuration +- `js/utils.js` — Shared helper functions +- `js/combat.js` — Combat and threat mechanics +- `js/strategy.js` — AI strategy decisions +- `js/sound.js` — Audio and music +- `js/render.js` — DOM rendering and UI updates +- `js/tutorial.js` — New-player tutorial flow +- `js/dismantle.js` — Dismantle / teardown mechanics +- `js/emergent-mechanics.js` — Emergent gameplay systems - `DESIGN.md` — Full design document with narrative arc and mechanics - `README.md` — This file ## No Build Required - This is a static HTML/JS game. Just open `index.html` in a browser. --- diff --git a/tests/test_readme_runtime_map.py b/tests/test_readme_runtime_map.py new file mode 100644 index 0000000..44de66a --- /dev/null +++ b/tests/test_readme_runtime_map.py @@ -0,0 +1,70 @@ +""" +Regression test: README file map must stay in sync with scripts loaded by index.html. + +Catches stale references (e.g. the old game.js) and missing documentation for +any new modules added to the runtime. +""" + +import re +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parent.parent +INDEX_HTML = REPO_ROOT / "index.html" +README_MD = REPO_ROOT / "README.md" + + +def _scripts_from_index_html() -> set[str]: + """Return the set of .js paths referenced in