Files
Dreierpack-Manager/src/modern/game/league_pairings.hpp
T
ClaudeandClaude Opus 5.5 f2fcb28f65 Fork the Classic season core into src/modern and add the world layout (M1)
- 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>
2026-10-23 18:08:54 +02:00

37 lines
1.5 KiB
C++

// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include "game/league_pairings.hpp"
#include <array>
#include <optional>
#include <span>
#include <string>
#include <vector>
#include "modern/game/modern_state.hpp"
#include "game/random.hpp"
namespace bmh::modern {
// Normal LeagueScreenShown(2,0)->Move(0) only. The App owns the staged Native/W/G
// transaction. No mutator here calls a presenter, advances a day, or saves.
LeaguePairingsOwner open_league_pairings_source(ModernState&,int manager,const LeaguePairingsConstants&);
LeaguePairingsOwner edit_league_pairings_source(ModernState&,const LeaguePairingsOwner&,
const LeaguePairingsEvent&,const LeaguePairingsConstants&,GameRandom&,WatcomRandom&);
// Pure, bounded Source projection; renderers never call a Native/RNG mutator.
LeaguePairingsView league_pairings_view_source(const ModernState&,const LeaguePairingsOwner&,
const LeaguePairingsConstants&);
// Read only active process descriptors, never reconstruct weather/referees from
// saved bytes or run event preparation. Last first-pair match follows Move.
std::optional<LeaguePairingsActivePacket> league_pairings_active_packet_source(
const ModernState&,const LeaguePairingsOwner&,const std::vector<MatchGroup>&,
std::span<const uint8_t> referee_profiles);
void validate_league_pairings_active_packet_source(const ModernState&,const LeaguePairingsOwner&,
const LeaguePairingsActivePacket&);
bool league_pairings_played_source(uint8_t raw);
bool league_pairings_postponed_source(uint8_t raw);
} // namespace bmh::modern