2.8 KiB
2.8 KiB
S5.3 — Task 1: Door interaction report
Worktree: /home/hectelyon/Documents/Projects/ProjetsPersos/DungeonCrawlerWorld/.worktrees/s5-3
Branch: slice/s5-3-door-interaction
Date: 2026-10-01
Delivered
- Added the dedicated domain
InteractionResolverand publicGameState.try_interact(). - The resolver uses the frozen target order: player cell, N, E, S, W, NE, SE, SW, NW.
- A closed door becomes
FLOOR, producesdoor_opened, and triggers the existing enemy-response mechanism exactly once. - Stairs under the player produce
stairs_usedand setexit_reached. - No target produces exactly
nothing_to_interact, with no player/enemy state change and no enemy turn. - Valid interaction refreshes FOV/exploration. Presentation refreshes map visibility, actor views, HUD prompt, and event log through the shared
Gamepath. submit_test_interact()and configuredInputEventinteraction both converge through_process_interact()intoGameState.try_interact().- Extended the project-owned visual check to capture the real application after opening its initial door (
--capture-door). - Updated README interaction and capture documentation.
TDD evidence
- Added door unit/E2E specifications before domain implementation.
- Red:
./scripts/test-unit.shfailed as intended becauseGameState.try_interactdid not exist (4 new tests failed withNonexistent function 'try_interact'). - Green: implemented the resolver and shared game path; all unit and E2E checks passed.
Automated verification
Executed from this worktree using Godot 4.5 and GUT 9.5:
| Command | Result |
|---|---|
./scripts/test-unit.sh |
PASS — 25 tests, 108 assertions |
./scripts/test-e2e.sh |
PASS — 9 tests, 105 assertions |
env -u DISPLAY ./scripts/run-visual-check.sh |
PASS — actual app launched through Xvfb; artifacts/visual-check.png is 1280×720 |
./scripts/verify.sh |
PASS — unit, E2E, visual checks |
git diff --check |
PASS |
The new real-scene E2E test verifies configured Space and E events, the submit_test_interact() seam, door opening, confirmation log/prompt refresh, and walking through the former door cell. Unit tests verify order, no-op behavior, FOV recalculation, one enemy response, and stairs precedence.
Visual proof
- Capture:
artifacts/visual-check.png(ignored/generated artifact) - Log:
artifacts/visual-check.log(ignored/generated artifact) - Run used Xvfb because
DISPLAYwas explicitly unset. - Capture was inspected and shows the initial north door rendered as floor, the prompt cleared, and the event log containing
You open the door.
Scope and repository hygiene
- Changes are confined to this worktree and task scope.
- No push or PR was created.
- Generated capture files remain ignored and are not part of the commit.