Files
systemic-game-design-course/course/02-action-queue/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 <[email protected]>
2026-10-29 19:13:11 +01:00
..
2026-10-29 02:30:26 +01:00
2026-10-29 02:30:26 +01:00
2026-10-29 02:30:26 +01:00
2026-10-29 02:30:26 +01:00
2026-10-29 02:30:26 +01:00

Module 2 reference engine (Rust)

The course's own engine as of the end of Module 2. It adds heroes, Health, Attack and Armor, triggered abilities, an event log, and the action queue that resolves one player action depth-first. Module 1's reference was the starting point, so a diff between the two shows what this module adds. Module 3's reference starts from this one.

  • src/engine/: generic machinery. Names no cards.
    • queue.rs: actions, the context an effect sees, and the resolver. Area damage creates every Damage Event before any trigger is queued; a Queue is filled once, oldest listener first, then locked; each trigger resolves completely before the next.
    • world.rs: entities, zones, order of play, heroes, stats, Armor and the log. Every state change records its event.
    • card.rs: card definitions (stats, triggers, a spell's effect) and the library.
    • event.rs: the engine's events. src/harness.rs translates them into the course's GameEvent.
  • src/content/mod.rs: card definitions. Each effect is a small function that returns actions; Module 5 turns them into data.
  • src/harness.rs: the adapter the course tests call. play is still the Module 1 Expansion Drop stub.

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