Files
systemic-game-design-course/course/09-turn-pipeline/reference/rust
Lucas WintherandClaude Opus 5.5 638549161f
CI / Tool tests and sync-check (push) Successful in 13s
CI / Verify references (all modules, Rust and TS) (push) Successful in 1m32s
CI / Verify Expansion Drop solutions (all modules, Rust and TS) (push) Successful in 1m35s
CI / Coupling audit on references (push) Successful in 13s
CI / Site build (push) Successful in 25s
CI / Naive engine tests (Module 0) (push) Successful in 32s
feat(ci): verify Expansion Drop solutions; README quick start, disclaimer link; Rust reference lockfiles
- verify-references --expansion overlays expansion/solution on each reference and runs the
  cumulative tests plus the drop test; refuses a solution that touches src/engine/
- CI job verify-expansions
- README: workspace-template + git init step, tool list, repo disclaimer link
- Cargo.lock for every Rust reference (staged with the reference, pins serde for rustc 1.85.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:13:11 +01:00
..
2026-10-29 04:28:17 +01:00
2026-10-29 04:28:17 +01:00
2026-10-29 04:28:17 +01:00
2026-10-29 04:28:17 +01:00
2026-10-29 04:28:17 +01:00

Module 9 reference engine (Rust)

The course's own engine as of the end of Module 9. Part I's card engine is unchanged, and all of its tests still pass. The Part II engine in src/engine/puzzle/ now plays a whole turn: movement, parse, conversion, parse, hazards, win, parse. Module 8's reference was the starting point, so a diff between the two shows what this module adds.

  • cards/ (at the crate root; not in this directory): Part I's card data, a copy of course/cards/ staged by tools/verify-references.mjs. Part II doesn't read it.
  • src/engine/puzzle/: the Part II engine. It names no noun: the engine's own words are the operators IS, AND, NOT, the meta-noun TEXT, the property PUSH of the base rule TEXT IS PUSH, the property YOU, which picks the objects that move, and from Module 9 the properties WIN (the win check) and FLOAT (which objects share a tile).
    • turn.rs (new): the turn. Phase, TURN (the phases in order) and Hazard (content's rule for what destroys what).
    • level.rs: a level in play. Module 9 adds Level::step, which runs the phases of TURN; the conversion phase (X IS Y in place, X IS X locks, X IS NOT X deletes); the hazards phase, which runs content's hazards in order; the win check; Level::sharing (the other objects on a tile at the same float level); won and lost. Level::new takes the hazards. move_you is now movement, then a reparse.
    • grid.rs: Module 9 adds Board::set_kind.
    • word.rs: Module 9 adds Lexicon::thing_named (what a conversion into a noun makes).
    • movement.rs, parse.rs, resolve.rs: unchanged.
    • mod.rs: the module's exports.
  • The rest of src/engine/: Part I, unchanged.
  • src/content/hazards.rs (new) and src/content/mod.rs: the hazards, in the order the engine runs them: SINK, HOT/MELT, DEFEAT. What destroys what at the end of a turn is content, not engine.
  • src/content/movement.rs: unchanged.
  • src/content/words.json: Module 9 adds HOT, MELT, SINK, DEFEAT and FLOAT.
  • src/harness.rs: the adapter the course tests call. Module 9 adds Baba::step, Baba::won and Baba::lost.

Run it with the module's tests: node tools/verify-references.mjs 09 from the course repository.