First Part II module. The cumulative reference adds a second engine (src/engine/puzzle: grid, lexer, parser) beside Part I's; nouns and properties are data in src/content/words.json, and the engine names only IS/AND/NOT/TEXT and the base rule TEXT IS PUSH. Rules are recompiled from the board on every change; rules() is a sorted set. Adds the M6 scenarios and tests (rows, columns, shared IS, AND distribution, stacked text, base rule), the HOT word as a data-only Expansion Drop, the lesson with the Part II bridge, and the Rust LevelDef shape in harness.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
16 lines
1.5 KiB
Markdown
16 lines
1.5 KiB
Markdown
# Module 6 Expansion Drop: HOT
|
|
|
|
The lesson's [Expansion Drop](../lesson.md#expansion-drop) beat explains the task. This file holds the scenario, the test locations and the check.
|
|
|
|
- Word: HOT, a property. "HOT is a property that causes the object to destroy any same-float MELT objects it contacts." (Baba Is You Wiki, HOT page, recorded in `docs/research/baba-is-you.md` §5.) This module only parses it; what HOT does arrives with the turn in Module 9.
|
|
- Tests: `tests/rust/test_06x.rs` and `tests/ts/test_06x.test.ts`. Copy the one for your track into your workspace's `tests/`.
|
|
- Reference answer: `solution/words.json`, one file for both tracks: the Module 6 reference's `src/content/words.json` with one entry added, `{ "name": "HOT", "role": "property" }`. Copy it over your workspace's `src/content/words.json`. Nothing under `src/engine/` changes, and neither does the harness.
|
|
- Check: commit your workspace before you start, then run `node tools/expansion-check.mjs <your-workspace> <that-commit>` from the course repository. It fails if any file under `src/engine/` changed.
|
|
|
|
## Scenario
|
|
|
|
### test_06x_hot_word
|
|
|
|
- Setup: `newBaba` with an empty level 5 wide and 1 high. Place `LAVA (0,0) IS (1,0) HOT (2,0) AND (3,0) PUSH (4,0)`.
|
|
- Assertions: `rules()` is exactly `["LAVA IS HOT", "LAVA IS PUSH", "TEXT IS PUSH"]`. Before the drop the parser doesn't know `HOT`, so the sentence stops after `IS` and spells nothing; `LAVA IS PUSH` appears only once `HOT AND` is a valid run of complements.
|