Modern UI contract: lineup, tactics and training reads and commands
lineup.commit takes the squad order and swaps rows into place after opening the board as the desk does; tactics.commit sets the eight values through the board's checks; training.commit initializes the plan when needed and applies decreases before increases so every step stays within the limits. Each is one revision and is rolled back as a whole when the engine refuses a step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
99a48a463d
commit
78b827a0e6
6 files changed
+305
-11
No files matched your search
@@ -838,16 +838,8 @@ public:
|
||||
}
|
||||
// The interface contract (docs/new_engine/ui-anbindung.md): a read in the contract's envelope
|
||||
// for the manager at the desk, at the revision the caller holds. Read-only.
|
||||
cli::Json ui_read(const cli::Json& request, uint64_t revision) const {
|
||||
UiContext context;
|
||||
context.state_revision = revision;
|
||||
context.manager = int(g_.memory.has(::bmh::layout::ActiveManager) ? g_.memory.u8(::bmh::layout::ActiveManager) : 0);
|
||||
const ui::DeskState desk = desktop_projection(revision);
|
||||
context.next_opponent = desk.next_opponent;
|
||||
context.next_competition = desk.next_competition_label;
|
||||
context.next_away = desk.next_match_away;
|
||||
return modern::ui_read(g_, context, request);
|
||||
}
|
||||
// Kinds of the session itself: lineup, tactics, training; the others in ui_contract.cpp.
|
||||
cli::Json ui_read(const cli::Json& request, uint64_t revision) const;
|
||||
// A command of the interface contract: checks career, expectedRevision and owner, runs the
|
||||
// engine action and answers command_result or error. A refused command leaves the state and
|
||||
// both generators untouched; a repeated requestId with the same command gets the stored
|
||||
|
||||
Reference in new issue
Block a user