Player12
An open source football management simulator
Loading...
Searching...
No Matches
transfer_negotiation.cpp File Reference
#include "model/transfer_negotiation.h"
#include <algorithm>
#include <array>
#include <cmath>
#include <limits>
#include <memory>
#include <numeric>
#include <ranges>
#include <utility>
#include "model/transfer_tuning.h"
#include "model/transfer_windows.h"
#include "model/world_rng.h"
#include "model/world_simulation.h"

Namespaces

namespace  TransferNegotiation
 Pure decision rules of the transfer market.
 

Functions

const char * TransferNegotiation::reasonKey (Reason reason)
 
bool TransferNegotiation::isValid (const OfferTerms &terms)
 
std::uint32_t TransferNegotiation::upfrontAmount (const OfferTerms &terms)
 
std::vector< std::uint32_t > TransferNegotiation::instalmentAmounts (const OfferTerms &terms)
 
OfferTerms TransferNegotiation::aiOfferTerms (std::uint32_t fee)
 
OfferTerms TransferNegotiation::aiBidFor (std::uint32_t asking_fee, int age)
 
Valuation TransferNegotiation::valueForSale (const SaleContext &context)
 
double TransferNegotiation::sellerValue (const OfferTerms &terms, int age)
 
ClubResponse TransferNegotiation::evaluateOffer (const SaleContext &context, const OfferTerms &terms, std::uint8_t round)
 
std::uint8_t TransferNegotiation::maxContractYears (int age)
 
ContractDemand TransferNegotiation::contractDemand (const PlayerContext &context)
 
std::uint32_t TransferNegotiation::agentAsk (const PlayerContext &context, const ContractDemand &demand, std::uint8_t round)
 
ContractResponse TransferNegotiation::evaluateContract (const PlayerContext &context, const ContractOffer &offer, std::uint8_t round)
 
float TransferNegotiation::appearanceRate (SquadRole role)
 
double TransferNegotiation::yearlyRiseWorth (std::uint32_t wage, std::uint8_t percent, std::uint8_t years)
 
ContractOffer TransferNegotiation::demandedOffer (const ContractDemand &demand)
 
ClubResponse TransferNegotiation::evaluateLoan (const LoanContext &context, const LoanTerms &terms)
 
bool TransferNegotiation::playerAcceptsLoan (SquadRole at_parent, SquadRole at_borrower, std::uint8_t ambition, int reputation_gap, std::vector< Reason > &reasons)
 
WindowInfo TransferNegotiation::windowInfo (LeagueID league, const GameDateValue &date)
 
float TransferNegotiation::activityWeight (const WindowInfo &window)
 
bool TransferNegotiation::canSignPreContract (std::uint8_t contract_years, const GameDateValue &date)
 
GameDateValue TransferNegotiation::seasonEndDate (const GameDateValue &date)
 
GameDateValue TransferNegotiation::contractEndDate (const GameDateValue &date, std::uint8_t contract_years)
 
GameDateValue TransferNegotiation::loanEndDate (const GameDateValue &start, LoanDuration duration)
 
int TransferNegotiation::weeksBetween (const GameDateValue &from, const GameDateValue &to)
 
std::int64_t TransferNegotiation::severancePay (std::uint32_t weekly_wage, std::uint8_t contract_years, const GameDateValue &date)
 
SquadRole TransferNegotiation::roleForRank (std::size_t rank)
 
PlayerRole TransferNegotiation::positionGroup (PlayerRole role)
 
SquadNeeds TransferNegotiation::squadNeeds (std::span< const std::pair< PlayerRole, float > > squad)
 
SquadFit TransferNegotiation::squadFit (const SquadNeeds &needs, PlayerRole role, float overall)