feat: implement and exhaustively test the game domain core

This commit is contained in:
2026-08-28 22:37:14 +03:00
parent a957d0defc
commit 65eca822c0
9 changed files with 456 additions and 8 deletions
+13 -2
View File
@@ -436,7 +436,7 @@ If all criteria pass, set this milestone to `DONE`, append its execution record,
## Milestone 007 — Implement and exhaustively test the game domain core
**Status:** `READY`
**Status:** `DONE`
**Depends on:** Milestone 006
### Objective
@@ -465,11 +465,22 @@ Implement all deterministic Battleship rules independently of Wi-Fi, HTTP, WebSo
If all criteria pass, set this milestone to `DONE`, append its execution record, and change Milestone 008 from `BLOCKED` to `READY`.
### Execution record
- Date: 2026-08-28
- Board model and revision: ESP32-C6FH4 QFN32, revision v0.2.
- Toolchain and library versions: PlatformIO Core 6.1.19; `espressif32` 7.0.1; ESP-IDF 6.0.1; `esp_littlefs` 1.20.4.
- Result: PASS.
- Evidence: Added a transport-independent fixed-size fleet generator and game engine. Fleet generation has 64 restarts with 128 bounded placement attempts per ship and a final boundary, composition, and no-touch validator. The game engine enforces phase, turn, coordinate, and repeated-shot validation; hit retention, miss handoff, sunk-ship border misses, victory, per-match statistics, and exactly one version increment for each accepted start or shot.
- Measurements: `make -C test/host run` passed 10,000 deterministic fleet generations, 10,000 fully simulated games, and rule/error atomicity tests. `pio run -e esp32-c6-devkitm-1` passed with 38,212 / 327,680 B RAM (11.7%) and 1,000,730 / 2,097,152 B flash (47.7%), within the Milestone 007 gates of 190,000 B remaining heap and 1,180,000 B firmware.
- Issues or deviations: No network-facing command integration or bot behavior was added; these remain later milestones.
- Next action: Milestone 008 is ready. Do not start it unless explicitly requested.
---
## Milestone 008 — Implement the ESP32 opponent
**Status:** `BLOCKED`
**Status:** `READY`
**Depends on:** Milestone 007
### Objective