Files
systemic-game-design-course/course/09-turn-pipeline/expansion/tests/rust/test_09x.rs
T
Lucas WintherandClaude Opus 5.5 1f3359cfe2 feat: module 09 turn pipeline
Module 9 lesson, scenarios, tests (8, both tracks), reference engines
(TURN phase list, conversion, content-registered hazards, win/lost),
WEAK Expansion Drop, harness.md M9 semantics, research notes (WEAK page,
baba-is-auto Game::MovePlayer, X IS NOT X placement reading).

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

28 lines
812 B
Rust

// Module 9 Expansion Drop: WEAK. The scenario is in expansion/README.md.
use engine::harness::*;
#[test]
fn test_09x_weak_breaks() {
let mut b = new_baba(LevelDef {
width: 5,
height: 4,
..Default::default()
});
for (word, x) in [("BABA", 0), ("IS", 1), ("YOU", 2)] {
b.place(&format!("text:{word}"), x, 0);
}
for (word, x) in [("ROCK", 0), ("IS", 1), ("WEAK", 2)] {
b.place(&format!("text:{word}"), x, 1);
}
let baba = b.place("baba", 0, 3);
let near_rock = b.place("rock", 1, 3);
let far_rock = b.place("rock", 3, 3);
b.step(Dir::Right);
assert_eq!(b.pos_of(baba), Some((1, 3)));
assert_eq!(b.pos_of(near_rock), None);
assert_eq!(b.kinds_at(1, 3), vec!["baba"]);
assert_eq!(b.pos_of(far_rock), Some((3, 3)));
}