Files
systemic-game-design-course/course/06-parser/expansion/tests/rust/test_06x.rs
T
Lucas WintherandClaude Opus 5.5 68fe9834c3 feat: module 06 parser
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]>
2026-10-29 03:33:53 +01:00

20 lines
485 B
Rust

// Module 6 Expansion Drop: HOT. The scenario is in expansion/README.md.
use engine::harness::*;
#[test]
fn test_06x_hot_word() {
let mut b = new_baba(LevelDef {
width: 5,
height: 1,
..Default::default()
});
for (word, x) in [("LAVA", 0), ("IS", 1), ("HOT", 2), ("AND", 3), ("PUSH", 4)] {
b.place(&format!("text:{word}"), x, 0);
}
assert_eq!(
b.rules(),
vec!["LAVA IS HOT", "LAVA IS PUSH", "TEXT IS PUSH"]
);
}