- 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>
47 lines
2.1 KiB
C++
47 lines
2.1 KiB
C++
// SPDX-License-Identifier: GPL-3.0-only
|
||
#pragma once
|
||
#include "modern/game/modern_state.hpp"
|
||
#include "game/stadium_blocks.hpp"
|
||
|
||
#include "modern/game/desk_actions.hpp"
|
||
#include "modern/game/weekly.hpp"
|
||
|
||
#include <array>
|
||
#include <cstdint>
|
||
#include <optional>
|
||
|
||
namespace bmh::modern {
|
||
|
||
// Source choices 8..15 map to eight independent A–H record slots. These must
|
||
// not be confused with StadiumInvestment's facilities 0..7.
|
||
|
||
|
||
// An immutable quote binds the Source owner and every record/table value that
|
||
// affects the quote. Commit recomputes this value before it touches money.
|
||
|
||
// Pure Source projection. Manual totals need not be multiples of 1000; only the
|
||
// eventual +54 byte is floored to thousands. The supported source boundary is
|
||
// 0..427 company percent, 0..255 thousand places, a positive duration, and
|
||
// trusted table maxima <=255000. Current/target placement must satisfy
|
||
// current<=target<=maximum; busy blocks, unknown idle feature bits, owner
|
||
// mismatches, disabled existing features, malformed constants and any
|
||
// intermediate that overflows Source's signed 32-bit arithmetic have no quote.
|
||
// A valid zero-price quote remains previewable; commit refuses to construct it.
|
||
std::optional<StadiumBlockExpansionQuote> quote_stadium_block_expansion(
|
||
const ModernState& g, int manager, StadiumBlockSlot slot, uint32_t total_target_places,
|
||
uint8_t desired_features, int company_price_percent,
|
||
const StadiumBlockExpansionConstants& constants);
|
||
|
||
// Commit an already resolved tip decision exactly once. `Declined` proceeds at
|
||
// the base quote; `Accepted` uses its precomputed price and weeks. A zero-price
|
||
// quote never constructs. Notice exceptions propagate so the caller can restore
|
||
// its full transaction checkpoint.
|
||
bool build_stadium_block_expansion(
|
||
ModernState& g, int manager, StadiumBlockSlot slot,
|
||
const StadiumBlockExpansionConstants& constants,
|
||
const StadiumBlockExpansionQuote& quote, const StandBlockOffer& resolved_offer,
|
||
WatcomRandom& rand, const ConstructionNoticeHook& payment_notice = {},
|
||
const SeasonTicketCompensationNoticeHook& compensation_notice = {});
|
||
|
||
} // namespace bmh::modern
|