Files
Dreierpack-Manager/src/game/transfer_bid.hpp
T
ClaudeandClaude Sonnet 5.5 287b5a9251 Add header comments to the source files
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>
2026-11-06 09:15:23 +01:00

42 lines
1.7 KiB
C++

// SPDX-License-Identifier: GPL-3.0-only
// Request/result types for rating a transfer bid (source slot, list entry and ownership are
// supplied by the caller, which owns the career-mode decisions).
// Header only; the functions that use these types take WatcomRandom and a MinuteReport as shown below.
#pragma once
#include <cstdint>
#include "game/random.hpp"
#include "game/human_buyer_sale.hpp"
#include "game/state.hpp"
namespace bmh {
struct MinuteReport;
// ProjectTransferOfferList rates an existing bid. source_slot is the actual absolute SquadSlots
// index supplied by its caller, not an inferred pool index or player ID.
// The caller owns list/source-slot correspondence and any career-mode decision.
struct TransferBidRatingRequest {
int source_slot = -1;
int list_entry = -1;
int bid_slot = -1;
int expected_bidder = -1;
int expected_player = -1;
// Only checked DispatchClubPlayerPendingOffers entries40..43 may rate parked native buyer4.
std::optional<SourcePendingOwner> source_pending_owner = std::nullopt;
};
struct TransferBidRating {
bool supported = false;
uint32_t fee_pct = 0;
uint32_t salary_pct = 0;
};
// Exact RateTransferBidSource -> ProjectTransferOfferList composition: Source32 products/unsigned division,
// proposed human board with all seven bonuses/rankFF/fitness, then one W90..100.
// Does not write bids, perform settlement, read GameMode or consume G. Any borrowed
// board is restored before returning or propagating a validation failure.
// Unsupported inputs require caller-owned staging/rollback; no zero-basis guess.
TransferBidRating rate_transfer_bid_source(GameState&, const TransferBidRatingRequest&,
WatcomRandom&, MinuteReport&);
} // namespace bmh