Every source file in ui, app, game, formats, cli, audio and launch that had none now starts with a short English comment: what it implements, what state it owns and how it relates to its neighbours (request/acknowledge flow, pairs of files, random generator use). Comment lines only; the full build and the runnable tests are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
35 lines
1.3 KiB
C++
35 lines
1.3 KiB
C++
// SPDX-License-Identifier: GPL-3.0-only
|
|
// Interface of the table forecast: the LeagueTableForecast result (table plus the game generator
|
|
// state after all draws) and compute_league_table_forecast, implemented in table_forecast.cpp.
|
|
// Never changes the native results or the current matchday.
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
|
|
#include "game/random.hpp"
|
|
#include "game/table.hpp"
|
|
|
|
namespace bmh {
|
|
|
|
// Scratch result of the Table screen's one-shot KI projection. `game_after`
|
|
// contains Source G after all per-ComputeLeagueTableForecast reseeds/draws; callers commit it
|
|
// only with the accepted UI/session transition. Native results and CurrentMatchday are
|
|
// never changed here.
|
|
struct LeagueTableForecast {
|
|
LeagueTable table;
|
|
GameRandom game_after{0};
|
|
int first_simulated_round = 0;
|
|
int simulated_rounds = 0;
|
|
};
|
|
|
|
// Only the reviewed E37 normal family entry (Source param2 == 0) is supported.
|
|
// All work is local: invalid input or a projection exception cannot mutate the
|
|
// caller's GameRandom or GameState.
|
|
LeagueTableForecast compute_league_table_forecast(
|
|
const GameState& game, int league, int source_param2, int matchdays,
|
|
int flags, int normal_mode, int sort_extra,
|
|
const std::array<uint8_t, 10>& gap, const GameRandom& game_random);
|
|
|
|
} // namespace bmh
|