docs(B.4b): correct file paths — WorldPicker lives in AcDream.Core.Selection

Original spec placed WorldPicker in src/AcDream.App/Rendering/ and the
test in tests/AcDream.App.Tests/, but AcDream.App.Tests doesn't exist
as a project. Moved to AcDream.Core.Selection where it conceptually
belongs (no App-layer deps; only WorldEntity + System.Numerics) and
where the existing AcDream.Core.Tests project can hold the tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-05-13 17:31:49 +02:00
parent 4a1c594887
commit ffa404d236

View file

@ -123,11 +123,15 @@ server's reply. Outbound is the only block.
One new file + edits to `GameWindow.cs`.
**New:** `src/AcDream.App/Rendering/WorldPicker.cs` — static helper
class in `AcDream.App.Rendering` namespace. Two pure methods, no
state, no DI. Lives next to `GameWindow.cs` because the picker
shares `WorldEntity` shape knowledge with the rendering layer (uses
`.ServerGuid` + `.Position`).
**New:** `src/AcDream.Core/Selection/WorldPicker.cs` — static helper
class in `AcDream.Core.Selection` namespace. Two pure methods, no
state, no DI. **Lives in Core** (not App) because it has no App-layer
dependencies: it operates on `WorldEntity` (Core) plus
`System.Numerics` matrices/vectors. Putting it in Core also means it
can be unit-tested via the existing `AcDream.Core.Tests` project; no
new test project required (`AcDream.App.Tests` does not exist as of
2026-05-13 and creating it would add more LOC than the picker
itself).
**Edited:** `src/AcDream.App/Rendering/GameWindow.cs`:
1. Rename field `_selectedTargetGuid``_selectedGuid` (project-wide
@ -299,8 +303,8 @@ player walks through doorway
### Testing
**Unit tests** — `tests/AcDream.App.Tests/Rendering/WorldPickerTests.cs`
(new file):
**Unit tests** — `tests/AcDream.Core.Tests/Selection/WorldPickerTests.cs`
(new file in existing test project):
| Test | Scenario | Asserts |
|---|---|---|
@ -363,8 +367,8 @@ This is one slice. No further sub-slicing.
| Step | Files | LOC | Subagent? |
|---|---|---|---|
| 1. Write `WorldPickerTests.cs` (TDD: tests first) | `tests/AcDream.App.Tests/Rendering/WorldPickerTests.cs` (new) | ~80 | Yes (Sonnet) — bounded TDD task |
| 2. Create `WorldPicker.cs` static helper | `src/AcDream.App/Rendering/WorldPicker.cs` (new) | ~50 | Same agent as step 1 |
| 1. Write `WorldPickerTests.cs` (TDD: tests first) | `tests/AcDream.Core.Tests/Selection/WorldPickerTests.cs` (new) | ~80 | Yes (Sonnet) — bounded TDD task |
| 2. Create `WorldPicker.cs` static helper | `src/AcDream.Core/Selection/WorldPicker.cs` (new) | ~50 | Same agent as step 1 |
| 3. Rename `_selectedTargetGuid``_selectedGuid` in `GameWindow.cs` | 1 file edit | ~5 sites | Manual or Sonnet |
| 4. Add 3 switch cases + 3 helper methods in `GameWindow.OnInputAction` | 1 file edit | ~40 | Manual or Sonnet |
| 5. `dotnet build` + `dotnet test` green | — | — | Manual |