# Historical RED reconstruction source # # Executed unchanged in a detached worktree at b5eaf0e with: # /snap/bin/godot4 --headless --path . -s res://addons/gut/gut_cmdln.gd \ # -gdir=res://tests/tdd_red -gexit # # It is preserved as S6.2 TDD evidence rather than placed under tests/, because # its assertion intentionally fails before chest interaction is implemented. extends GutTest const GridMapState = preload("res://scripts/domain/grid_map_state.gd") const ActorState = preload("res://scripts/domain/actor_state.gd") const GameState = preload("res://scripts/domain/game_state.gd") func test_interacting_with_a_chest_reports_chest_opened() -> void: var chest := Vector2i(3, 2) var map := GridMapState.new(Vector2i(9, 7), GridMapState.CellKind.FLOOR) map.set_cell(chest, GridMapState.CellKind.CHEST) var state := GameState.new(map, ActorState.new(&"player", Vector2i(3, 3), 12, 3), {}) var results := state.try_interact() assert_eq(results[0].kind, &"chest_opened")