End the mission and say how it went #42
No reviewers
Labels
No labels
area/ai
area/build
area/character
area/combat
area/data
area/docs
area/game
area/net
area/ui
area/world
size
l
size
m
size
s
type
bug
type
design
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
icub3d/terra-redux-org!42
Loading…
Reference in a new issue
No description provided.
Delete branch "12-victory-and-defeat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
M1 is "played to victory or defeat". Until now a mission had no ending: a wiped squad kept
being handed turns it had nobody left to spend, and the only way out was Escape.
The objective lives outside the HUD
src/game/holds it — for now, one objective: the mission ends when a side has nobodystanding. It is there rather than in the UI because a mission that ends only when
somebody is looking at it cannot be played headlessly, and #13 has to watch one run to
completion with no renderer. Every test here does exactly that.
Losing everybody at once is a defeat. A cell that is gone has not won, whatever happened to
the opposition, and saying so explicitly beats letting the order of two checks decide it.
MissionReportcounts turns handed out and the fallen on both sides. It outlives themission it describes — the screen that reports it is a different state from the one that
produced it — and is removed on leaving the results so a second run starts from nothing.
Acceptance criteria
src/game/, and everytest observes it with no renderer present.
menu, and asserts no
Unitentities and no mission resources survive.mission twice, asserts everybody arrives whole the second time, and asserts both runs
come out the same way. That is ADR 0007 and 0008's determinism observed end to end.
widgetbuilders andthemetokens — verdict in words as well ascolour, tally, and the way back. Every string ASCII, because
assets/fonts/is empty(#27).
Escape stops being a placeholder and becomes what it is: abandoning a mission. It goes to
the menu rather than the results, because walking out is not an outcome.
Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test—196 passing, up from 188. Seven of the new ones are whole missions fought headlessly.
The results screen has not been seen on the device. The app runs and does not panic,
but I passed 70 turns through the HUD's
Waitcontrol without reaching an ending, and Idid not work out why — headlessly the same mission ends in 44 frames once turns are passed.
A probe confirmed a single press travels the whole path correctly (press →
Confirmed→accepted →
Resolving→Animating), so the mechanism works; something about driving itby
adbtaps does not. I would rather flag that than claim a screen I have not looked at.Closes #12
🤖 Generated with Claude Code
https://claude.ai/code/session_01TA4hJHkRSU3XBxZYtMKXdh