Player12
An open source football management simulator
Loading...
Searching...
No Matches
CareerTimeline Namespace Reference

The manager's career across every club: spells, trophies, honours, promotions and relegations, season finishes, club records and key signings, oldest first. Pure and deterministic (identical after a reload); also exported as a Markdown journal. More...

Functions

std::vector< TimelineEntry > build (const TimelineSources &sources)
 
TimelineSources sourcesFor (const Game &game, const GameData &gamedata, std::vector< RecordEntry > &records)
 
std::string toMarkdown (const TimelineSources &sources, std::span< const TimelineEntry > entries, const GameDateValue &today)
 
std::string journalFileName (std::string_view manager_name, const GameDateValue &today)
 
std::optional< std::filesystem::path > writeJournal (const std::string &markdown, const std::filesystem::path &folder, const std::string &file_name)
 

Variables

constexpr std::size_t KEY_SIGNINGS_PER_STINT = 3
 

Detailed Description

The manager's career across every club: spells, trophies, honours, promotions and relegations, season finishes, club records and key signings, oldest first. Pure and deterministic (identical after a reload); also exported as a Markdown journal.

Function Documentation

◆ build()

std::vector< TimelineEntry > CareerTimeline::build ( const TimelineSources &  sources)

◆ journalFileName()

std::string CareerTimeline::journalFileName ( std::string_view  manager_name,
const GameDateValue &  today 
)

File name of a journal: "career-<name>-<date>.md" (ASCII only).

◆ sourcesFor()

TimelineSources CareerTimeline::sourcesFor ( const Game &  game,
const GameData &  gamedata,
std::vector< RecordEntry > &  records 
)

The sources of a running game. The club records of the manager's clubs are copied into records, which must outlive the returned sources.

◆ toMarkdown()

std::string CareerTimeline::toMarkdown ( const TimelineSources &  sources,
std::span< const TimelineEntry >  entries,
const GameDateValue &  today 
)

The career journal as Markdown, in the current language: a summary of the spells, then the timeline grouped by season.

◆ writeJournal()

std::optional< std::filesystem::path > CareerTimeline::writeJournal ( const std::string &  markdown,
const std::filesystem::path &  folder,
const std::string &  file_name 
)

Writes markdown to folder / file_name, creating the folder. Returns the written path, or nullopt when the file could not be written.

Variable Documentation

◆ KEY_SIGNINGS_PER_STINT

constexpr std::size_t CareerTimeline::KEY_SIGNINGS_PER_STINT = 3
inlineconstexpr

Biggest signings listed per spell.