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:
parent
4a1c594887
commit
ffa404d236
1 changed files with 13 additions and 9 deletions
|
|
@ -123,11 +123,15 @@ server's reply. Outbound is the only block.
|
||||||
|
|
||||||
One new file + edits to `GameWindow.cs`.
|
One new file + edits to `GameWindow.cs`.
|
||||||
|
|
||||||
**New:** `src/AcDream.App/Rendering/WorldPicker.cs` — static helper
|
**New:** `src/AcDream.Core/Selection/WorldPicker.cs` — static helper
|
||||||
class in `AcDream.App.Rendering` namespace. Two pure methods, no
|
class in `AcDream.Core.Selection` namespace. Two pure methods, no
|
||||||
state, no DI. Lives next to `GameWindow.cs` because the picker
|
state, no DI. **Lives in Core** (not App) because it has no App-layer
|
||||||
shares `WorldEntity` shape knowledge with the rendering layer (uses
|
dependencies: it operates on `WorldEntity` (Core) plus
|
||||||
`.ServerGuid` + `.Position`).
|
`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`:
|
**Edited:** `src/AcDream.App/Rendering/GameWindow.cs`:
|
||||||
1. Rename field `_selectedTargetGuid` → `_selectedGuid` (project-wide
|
1. Rename field `_selectedTargetGuid` → `_selectedGuid` (project-wide
|
||||||
|
|
@ -299,8 +303,8 @@ player walks through doorway
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
**Unit tests** — `tests/AcDream.App.Tests/Rendering/WorldPickerTests.cs`
|
**Unit tests** — `tests/AcDream.Core.Tests/Selection/WorldPickerTests.cs`
|
||||||
(new file):
|
(new file in existing test project):
|
||||||
|
|
||||||
| Test | Scenario | Asserts |
|
| Test | Scenario | Asserts |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
|
@ -363,8 +367,8 @@ This is one slice. No further sub-slicing.
|
||||||
|
|
||||||
| Step | Files | LOC | Subagent? |
|
| 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 |
|
| 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.App/Rendering/WorldPicker.cs` (new) | ~50 | Same agent as step 1 |
|
| 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 |
|
| 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 |
|
| 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 |
|
| 5. `dotnet build` + `dotnet test` green | — | — | Manual |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue