Player12
An open source football management simulator
Loading...
Searching...
No Matches
loan_negotiation.cpp File Reference
#include "model/loan_negotiation.h"
#include <algorithm>
#include <array>
#include <cmath>
#include <limits>
#include <optional>
#include <utility>
#include "model/transfer_tuning.h"

Namespaces

namespace  LoanNegotiation
 How an AI club negotiates to borrow one of the managed club's players.
 

Functions

const char * LoanNegotiation::whyKey (Why why)
 
bool LoanNegotiation::isValid (const LoanTerms &terms)
 
int LoanNegotiation::loanWeeks (const BorrowerContext &context, LoanDuration duration)
 
double LoanNegotiation::expectedAppearances (const BorrowerContext &context, LoanDuration duration)
 
double LoanNegotiation::unplayedOdds (double expected, std::uint8_t minimum)
 
std::uint8_t LoanNegotiation::maxWageShare (const BorrowerContext &context)
 
double LoanNegotiation::borrowerCost (const BorrowerContext &context, const LoanTerms &terms)
 
double LoanNegotiation::effectiveCeiling (const BorrowerContext &context)
 
bool LoanNegotiation::affordable (const BorrowerContext &context, const LoanTerms &terms)
 
BorrowerReply LoanNegotiation::respond (const BorrowerContext &context, const LoanTerms &current, const LoanTerms &asked, double roll)
 
LoanTerms LoanNegotiation::openingOffer (const BorrowerContext &context, LoanDuration duration, std::uint8_t share, int age, double option_roll)
 
std::uint32_t LoanNegotiation::ceilingFor (const BorrowerContext &context, const LoanTerms &opening, double roll)