~bigbes/game-prototype-ftl

1177709a44a65cf00dd51d7b7b48e41852a4cf97 — Eugene Blikh 30 days ago 3aab76e
docs(crew-movement): record verify summary
1 files changed, 27 insertions(+), 0 deletions(-)

M docs/tasks/crew-movement.md
M docs/tasks/crew-movement.md => docs/tasks/crew-movement.md +27 -0
@@ 131,3 131,30 @@ Per task `TDD: yes` — tests from Phase 1 and Phase 2 written first, must fail 

- `inpututil` is a standard Ebitengine subpackage that works under WASM; no conditional imports needed. If it doesn't, Phase 3 falls back to `ebiten.IsMouseButtonPressed` + manual edge detection.
- Mouse coords in the browser: `ebiten.CursorPosition()` is documented to return logical-space coords via `Layout`; this is how WASM-served Ebitengine games handle input. If verify finds the browser returns raw canvas pixels, the fix is a single `(windowW, windowH) := ebiten.WindowSize()` scale step.

## Verify

**Result:** passed

Positive:
- CK1 — `go test -v ./...` → 14/14 pass (7 walkability/BFS, 7 crew tick)
- CK2 — `go build ./...` → clean native build
- CK3 — `make build-wasm` → clean WASM build, `web/main.wasm` produced
- CK4 — WASM smoke: 3 crew render at correct tiles (A in Pilot, B in Shields, C in Engines) with distinct tints
- CK5 — click on Bob → white selection ring appears around B
- CK6 — click MedBay tile (7,13) with Bob selected → Bob walks Shields → MedBay tile-by-tile, ring follows

Negative:
- CK7 — `TestBFSPath_unreachable` covers walkable→off-ship; CK8 covers same-tile (returns nil)
- CK8 — `TestBFSPath_sameTile` returns empty
- CK9 — `TestUpdateCrew_idle` confirms empty-path tick is a no-op
- CK10 — WASM smoke: click off-ship tile (20,5) with Bob selected → no movement, selection persists

Invariants / assumptions:
- CK11 (IV1) — `grep "hajimehoshi\|inpututil" ship.go tiles.go crew.go` → empty
- CK12 (IV2) — `grep "TilePx\|VirtualW\|VirtualH" ship.go tiles.go crew.go` → empty (no pixel constants in pure files)
- CK13 (IV3) — `grep "c\.\(TileX\|TileY\|MoveT\|Path\)\s*=" render.go` → empty (render never mutates Crew)
- CK14 (IV4) — `TestBFSPath_deterministic` passes
- CK15 (IV5) — `grep "//go:build" --include="*.go"` → empty; no platform-suffixed files; native + WASM both build clean

Smoke: WASM at `http://localhost:8765/` — selection, BFS dispatch, multi-tile movement, and unreachable-click no-op all observed visually.