Removes internal process references so the repo is presentable to an outside audience: dropped the internal build-retrospective doc (process log with internal terms, not useful to an outside reader), and reworded remaining internal references in code comments and module docs (agents.md cards, architecture.md, MODULES.md, index.html, package.json) to generic descriptions of what changed and when, with no behavior change -- full 47/47 suite re-run green after the scrub, every edit verified comment/doc-only via diff. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
18 lines
1.1 KiB
Markdown
18 lines
1.1 KiB
Markdown
# js/physics/state/ — agents.md
|
|
Part of the modularization pass. Module map: `MODULES.md`; runtime model: `architecture.md`.
|
|
|
|
Installs into `P`: createGame, makeBird, activeBird.
|
|
|
|
- `createGame(levelDef)` is the ONLY constructor of a gameplay state object.
|
|
Its shape (keys `level, world, time, score, birds, blocks, enemies, events,
|
|
scorePopups, hadEnemies, camera, status, activeBird, launched, wonAt, lostAt,
|
|
stats`) is consumed by render, app and every test — extending is OK, silently
|
|
dropping a key is not.
|
|
- Block/enemy/bird records are plain objects. S-3/S-5 (added)
|
|
extended them additively: blocks carry `ang`, `angVel`, `pivoting`
|
|
(topple DOF) and birds gain the `landed` state (a live body under gravity
|
|
while another bird is in play; see step/topple). Keep further extensions
|
|
additive and keep `createGame` the single place where initial state is minted.
|
|
- `activeBird(g)` is the canonical "whose turn is it" query — input, camera and
|
|
rules all go through it; do not re-derive it elsewhere.
|
|
- Consumes: WORLD, MATERIALS, BIRD_TYPES, ENEMY_TYPES (constants) + makeBird.
|