Modern UI contract: the end of the game

Resigning as the only or last human ends the game as the end of the set
duration does: the highscore hook updates and shows the table. The end's
reason and date are saved; the session read follows the contract's
Session schema (archived managers, termination reason, ownership, mode),
managers become archived (resigned or retired) and their employments end
with the career. The resign answer carries the ownership change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-27 18:39:32 +01:00
1 parent 6570384642
commit d6d31f939d
10 files changed
+99 -20

No files matched your search

+5
View File
@@ -93,6 +93,11 @@ struct ModernState : GameState {
};
std::vector<PressEntry> press;
uint32_t press_serial = 0;
// How and when the career ended ("" while it runs; "career_completed" when the set duration ran
// out, "last_human_resigned" when the only or last human manager gave up): the interface's
// terminationReason and the end of the employments.
std::string career_end_reason;
uint32_t career_end_date = 0;
// The scale of the traffic access bytes (traffic.hpp): 0 the original's (steps of 0x55), 64 the
// four stages of a Modern world. Older Modern saves are converted when loaded.
uint8_t traffic_scale = 0;