Files
systemic-game-design-course/course/09-turn-pipeline/expansion/tests/ts/test_09x.test.ts
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

32 lines
831 B
TypeScript

// Module 9 Expansion Drop: WEAK. The scenario is in expansion/README.md.
import { expect, test } from "vitest";
import { newBaba } from "../src/harness";
test("test_09x_weak_breaks", () => {
const b = newBaba({ width: 5, height: 4, objects: [] });
for (const [word, x] of [
["BABA", 0],
["IS", 1],
["YOU", 2],
] as const) {
b.place(`text:${word}`, x, 0);
}
for (const [word, x] of [
["ROCK", 0],
["IS", 1],
["WEAK", 2],
] as const) {
b.place(`text:${word}`, x, 1);
}
const baba = b.place("baba", 0, 3);
const nearRock = b.place("rock", 1, 3);
const farRock = b.place("rock", 3, 3);
b.step("right");
expect(b.posOf(baba)).toEqual([1, 3]);
expect(b.posOf(nearRock)).toBeNull();
expect(b.kindsAt(1, 3)).toEqual(["baba"]);
expect(b.posOf(farRock)).toEqual([3, 3]);
});