feat(game): complete authoritative gameplay mechanics
This commit is contained in:
@@ -555,12 +555,12 @@ server-enforced role-specific visibility.
|
||||
A live `GET /health` returned
|
||||
`{"status":"serving","healthy":true,"version":"0.6.0","errorCode":0}`.
|
||||
These host, serialization, build, resource, and physical-board results
|
||||
provide concrete evidence for all six acceptance criteria. Milestone 007
|
||||
remains `NOT_STARTED`.
|
||||
provide concrete evidence for all six acceptance criteria and complete
|
||||
Milestone 006.
|
||||
|
||||
## Milestone 007 — Keys, artifacts, compasses, exits, and results
|
||||
|
||||
**Status:** `NOT_STARTED`
|
||||
**Status:** `COMPLETE`
|
||||
|
||||
### Objective
|
||||
|
||||
@@ -592,9 +592,68 @@ Complete the authoritative gameplay mechanics and terminal match outcomes.
|
||||
|
||||
### Evidence
|
||||
|
||||
Completion evidence is not yet available because this milestone has not
|
||||
started. Required evidence includes complete mechanic tests and timestamped
|
||||
result-window tests.
|
||||
- `bash scripts/run_host_tests.sh` completed successfully. Its new deterministic
|
||||
mechanics suite reported `game key inventory, drop, and sabotage: PASS`,
|
||||
`game atomic meeting key return: PASS (opponent keys swapped to owners)`,
|
||||
`game owner-only exit opening and outward move: PASS`, `game one-use vision
|
||||
duration: PASS (10 successful moves, failed move ignored)`, `game compass
|
||||
bearing and role-specific projections: PASS`, and `game outward result
|
||||
window: PASS (200 ms draw boundary, 201 ms winner)`. All Milestone 001-006
|
||||
host regressions and the reproducible web-asset check passed in the same run.
|
||||
- The key tests exercised pickup of both owner and opponent keys, one-slot
|
||||
rejection, opponent-key sabotage, deterministic pickup when both keys occupy
|
||||
one cell, voluntary drop, and rejected empty drop. They asserted after every
|
||||
transition that each key existed exactly once on the ground or in one
|
||||
inventory. A crossed-key meeting cleared both inventories and reassigned the
|
||||
keys to their owners in one state transition.
|
||||
- Exit tests proved that the wrong key cannot open a player's own exit and that
|
||||
neither carrying the opponent's key nor standing at the opponent's exit
|
||||
permits opening or an outward move. Carrying the matching key opened only the
|
||||
owner's exit; a later outward boundary command was required to enter the
|
||||
finish window. Timestamped cases proved that the second outward move at
|
||||
exactly 200 ms produces a draw, while advancing time at 201 ms finalizes the
|
||||
first player as winner; the symmetric Player 2 winner case also passed.
|
||||
- Artifact tests consumed an artifact once, selected the authoritative radius
|
||||
six, retained all ten moves after entry, ignored a failed move, and returned
|
||||
to radius three after exactly ten later successful moves. Compass tests
|
||||
produced the direct eight-way bearing to only the activating player's own
|
||||
exit, preserved it across a rejected command, and cleared it on the next
|
||||
successful move.
|
||||
- Projection inspection covered both player roles and the observer. Player
|
||||
snapshots contained only their own inventory, effect, compass hint, and exit
|
||||
state; an opponent's carried key appeared only while that opponent was
|
||||
visible and disappeared when hidden. Observer snapshots contained both
|
||||
inventories, effects, hints, exit states and timestamps, all remaining
|
||||
ground objects, and the result. The complete default `128 x 64` observer
|
||||
snapshot serialized into 688 versioned chunks with a worst-case maximum of
|
||||
471 bytes, below the 512-byte message bound. Independent AddressSanitizer and
|
||||
UndefinedBehaviorSanitizer runs of both game suites passed without findings;
|
||||
leak detection was disabled because the sandbox executes under `ptrace`.
|
||||
- `PLATFORMIO_SETTING_ENABLE_TELEMETRY=no
|
||||
/home/sasa/.platformio/penv/bin/pio project config` parsed the locked
|
||||
`espressif32@7.0.1`, ESP-IDF, `esp32-c6-devkitm-1`, `partitions.csv`, and
|
||||
`sdkconfig.defaults` configuration, including the isolated
|
||||
`milestone-007-device-test` environment. `/home/sasa/.platformio/penv/bin/pio
|
||||
run -e esp32-c6-devkitm-1` completed with `[SUCCESS]`, reporting 47,508 of
|
||||
327,680 RAM bytes and 1,005,274 of 2,097,152 application bytes; the independent
|
||||
partition check reported `firmware.bin uses 1005904/2097152 bytes in
|
||||
partition factory`. The isolated device image also built with `[SUCCESS]`,
|
||||
using 124,628 RAM bytes and 1,020,168 application bytes, with
|
||||
`firmware.bin uses 1020800/2097152 bytes in partition factory`.
|
||||
- `/home/sasa/.platformio/penv/bin/pio run -e esp32-c6-devkitm-1 --target
|
||||
buildfs` completed with `[SUCCESS]`; the partition check reported
|
||||
`littlefs.bin uses 2031616/2031616 bytes in partition littlefs`. The test image
|
||||
upload identified an ESP32-C6FH4 revision 0.2 with 4 MB embedded Flash and
|
||||
hash-verified each write. The board logged `M007 events: artifact=0, key=0,
|
||||
hint=8, opened=1, outward=1, result=1, sequence=6`, player and complete
|
||||
observer projections, `fixed=34776/40960 bytes, runtime=6/50 ms,
|
||||
heap_delta=0`, and `M007 physical mechanics test: PASS`.
|
||||
- The normal firmware was restored and hash-verified after the isolated test.
|
||||
A live `GET /health` returned
|
||||
`{"status":"serving","healthy":true,"version":"0.7.0","errorCode":0}`.
|
||||
These deterministic, security-boundary, size, sanitizer, and physical-board
|
||||
results provide concrete evidence for all six acceptance criteria. Milestone
|
||||
008 remains `NOT_STARTED`.
|
||||
|
||||
## Milestone 008 — Player browser experience
|
||||
|
||||
|
||||
Reference in New Issue
Block a user