Player12
An open source football management simulator
Loading...
Searching...
No Matches
TransferListing Struct Reference

Represents a player listed on the transfer market. More...

#include <transfer_listing.h>

Public Member Functions

 TransferListing (PlayerID pid, TeamID seller, uint32_t price, GameDateValue date, float attention=0.0f)
 Constructs a new TransferListing with bid state cleared.
 
 TransferListing ()=default
 Default constructor for map/serialization use.
 

Public Attributes

PlayerID player_id
 
TeamID seller_team_id
 
uint32_t asking_price
 
GameDateValue listing_date
 
std::optional< TeamID > highest_bidder_id
 
uint32_t highest_bid = 0
 
float attention_score = 0.0f
 

Detailed Description

Represents a player listed on the transfer market.

Tracks the asking price, listing date, and the current highest bid (if any). Owned by GameController as part of the transfer_listings map.

Constructor & Destructor Documentation

◆ TransferListing() [1/2]

TransferListing::TransferListing ( PlayerID  pid,
TeamID  seller,
uint32_t  price,
GameDateValue  date,
float  attention = 0.0f 
)

Constructs a new TransferListing with bid state cleared.

Parameters
pidPlayer ID.
sellerID of the selling team.
priceAsking price in currency units.
dateDate the listing was created.
attentionThe pre-calculated attention score.

◆ TransferListing() [2/2]

TransferListing::TransferListing ( )
default

Default constructor for map/serialization use.

Member Data Documentation

◆ asking_price

uint32_t TransferListing::asking_price

◆ attention_score

float TransferListing::attention_score = 0.0f

◆ highest_bid

uint32_t TransferListing::highest_bid = 0

◆ highest_bidder_id

std::optional<TeamID> TransferListing::highest_bidder_id

◆ listing_date

GameDateValue TransferListing::listing_date

◆ player_id

PlayerID TransferListing::player_id

◆ seller_team_id

TeamID TransferListing::seller_team_id

The documentation for this struct was generated from the following files: