fix(puzzle): an object steps once per movement phase; negated conversion is settled per object
Bug 1 (modules 08-10): a YOU object pulled by an earlier mover took a second step of its own. Level movement now keeps the ids that stepped in a committed plan this phase; such a YOU object starts no move, and Planner try_move answers no for it. Regression: test_08x_pulled_you_moves_once (Module 8 Expansion Drop). Bug 2 (modules 09-10): convert honoured negation only per rule, so ALL IS ROCK beat BABA IS NOT ROCK. A target Y is now skipped for an object if any active negated rule IS NOT Y names it. Module 9 and 10 references (and their drop solutions) now carry ALL, the Module 7 Expansion Drop. Regression: test_09_negated_conversion_beats_group. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
638549161f
commit
8467c7929e
28 files changed
+293
-32
No files matched your search
@@ -5,8 +5,8 @@ The course's own engine as of the end of Module 8. Part I's card engine is uncha
|
||||
- `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`, and from Module 8 the property `YOU`, which picks the objects that move.
|
||||
- `grid.rs`: the level format, object kinds and the board. Module 8 adds `Board::find`, `Board::remove`, `Board::shift`, `Board::at` and `Display` for `Kind` (the kind as placed, for `kinds_at`).
|
||||
- `movement.rs` (new): validate, then commit. `Planner` (`try_move`, `staying_at`, `destroy`, `has`), `Step`, `Plan`, `Response` and `Dir`. The planner reads the board and plans one step at a time; for each step it runs content's movement responses in order, and rolls back everything a step added if a response blocks it. The edge of the level blocks every step.
|
||||
- `level.rs`: a level in play. Module 8 adds `Level::move_you`: the `YOU` objects move one at a time, furthest ahead first, each planned and then committed; the rules are reparsed once at the end. `has_property` is `false` for a destroyed object.
|
||||
- `movement.rs` (new): validate, then commit. `Planner` (`try_move`, `staying_at`, `destroy`, `has`), `Step`, `Plan`, `Response` and `Dir`. The planner reads the board and plans one step at a time; for each step it runs content's movement responses in order, and rolls back everything a step added if a response blocks it. The edge of the level blocks every step, and an object that has already stepped in the same move can't step again.
|
||||
- `level.rs`: a level in play. Module 8 adds `Level::move_you`: the `YOU` objects move one at a time, furthest ahead first, each planned and then committed, and an object steps at most once per move (a `YOU` object that an earlier move carried along doesn't start its own); the rules are reparsed once at the end. `has_property` is `false` for a destroyed object.
|
||||
- `word.rs`, `parse.rs`, `resolve.rs`: unchanged.
|
||||
- `mod.rs`: the module's exports.
|
||||
- The rest of `src/engine/`: Part I, unchanged.
|
||||
|
||||
Reference in new issue
Block a user