`make match` plays one whole match from the lobby to the results and back to the lobby: one scripted player and 23 bots on a local server, with no script errors. - CommandLog records the seed, the rules and every command the server is given. MatchReplay plays a log again with nobody thinking and ends on the same state hash; `make match` saves the log, reads it back and checks that. - ServerLoop.submit() is now the one way commands reach the simulation, so a recording server sees them all. - ScriptedPlayer plays a human seat: it drops, loots, fights and flees as a bot does, and also cuts driftwood and builds a breakwater and a wall. - Bots draw randomness from their own per-bot generators, not the simulation's streams. A bot thinking no longer changes the simulation's state, which a replay without bots needs. - MatchView and EntityView draw a match from one Simulation: terrain, sea, points of interest, props, pieces, players, the barge, items and chests, with stand-in shapes for the art pass to replace. - `make match-captures` renders eight stages of the recorded match. Closes #31 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
740 B
Bash
Executable File
21 lines
740 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Renders each stage of the match `make match` last played, from its command log, in
|
|
# the capture container: captures/match_<stage>.png. Needs Docker and
|
|
# build/match/match.tclog. Open the images and look at them.
|
|
set -uo pipefail
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
if [[ ! -f build/match/match.tclog ]]; then
|
|
echo "match-captures FAIL: no build/match/match.tclog; run 'make match' first"
|
|
exit 1
|
|
fi
|
|
status=0
|
|
for stage in lobby barge glide landed built final tide results; do
|
|
if ! tools/capture.sh "match_$stage" "captures/match_$stage.png"; then
|
|
echo "match-captures FAIL: stage $stage"
|
|
status=1
|
|
fi
|
|
done
|
|
[[ "$status" -eq 0 ]] && echo "match-captures: ok (8 stages in captures/match_*.png)"
|
|
exit "$status"
|