- src/modern/game: the season modules as bmh::modern, working on ModernState (a GameState). Data types stay shared with Classic; Modern code calls its season functions qualified (modern::...), so a missing Modern function is a compile error instead of a silent call into Classic. - src/modern/app/modern_session: the session on the Modern core. It still uses the Classic UI projections until the Modern projections exist. - SeasonHooks: the shared match core reaches player statistics and the table prediction of the season core that owns the game (Classic: unchanged). - WorldLayout: team ranges, squad slots and pools of the running world. Shared code and the Modern fork read them; Classic keeps the original numbers. - Transfer list views moved to game/transfer_offer_view.hpp (shared). - tools/modern/check_fork_calls.sh, modern_season_sim and world_layout_tests. Verified: Classic tests and replay regression unchanged; season_sim and modern_season_sim produce identical output with Classic data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
2.1 KiB
C++
49 lines
2.1 KiB
C++
// SPDX-License-Identifier: GPL-3.0-only
|
|
#pragma once
|
|
#include "game/turn_driver.hpp"
|
|
|
|
#include <cstdint>
|
|
#include <functional>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "game/match_engine.hpp"
|
|
#include "modern/game/desk.hpp"
|
|
#include "game/random.hpp"
|
|
#include "modern/game/modern_state.hpp"
|
|
#include "modern/game/season.hpp"
|
|
#include "game/sportschau_presentation.hpp"
|
|
#include "game/transfer_allocator.hpp"
|
|
|
|
namespace bmh::modern {
|
|
|
|
|
|
// Controller-level sound events carry stable identities. An original cue is optional:
|
|
// only attach one when its concrete BMH call site is mapped to a cue by evidence.
|
|
|
|
// WaitingAtDesk has not claimed the driver: its original request may be retried.
|
|
|
|
// Read-only-ready copy of the most recently completed human matchday. Kept apart
|
|
// from `groups`, which is replaced while seeking the next calendar event.
|
|
|
|
// Runtime state between a desk's kickoff request and the next desk. The group objects,
|
|
// referee table, presentation settings and random generators remain owned by the caller/
|
|
// controller for each synchronous advance; only this cursor survives the desk handoff.
|
|
|
|
// Bind an event already prepared by prepare_event and with its first human desk open.
|
|
// No generators are drawn here; the object becomes the only accepted continuation for it.
|
|
bool begin_turn_driver(TurnDriver& driver, const ModernState& g, std::vector<MatchGroup> groups,
|
|
uint16_t calendar_entry, std::vector<uint8_t> referees,
|
|
uint64_t session_id, uint64_t revision, std::string& error);
|
|
|
|
// Accept the current desk's advance request, show the next manager desk when applicable,
|
|
// then play the event in the background and advance through calendar days to the next desk.
|
|
// Rejected/stale requests leave state and both random generators untouched.
|
|
TurnAdvanceResult advance_to_next_desk(TurnDriver& driver, ModernState& g,
|
|
const TurnAdvanceRequest& request,
|
|
GameRandom& game, WatcomRandom& rand,
|
|
MinuteReport& report);
|
|
|
|
} // namespace bmh::modern
|