Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_insights.cpp File Reference
#include "model/match_insights.h"
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <format>
#include "model/match_engine.h"
#include "model/match_report.h"

Functions

MatchDetail captureDetail (const MatchEngine &engine)
 
std::array< int, 3 > finalThirdByFlank (const MatchDetail &detail, bool home)
 Final-third touches of one side split by flank (attacking frame).
 
std::vector< KeyMoment > keyMoments (const InsightInput &input)
 
std::vector< AnalysisLine > summariseMatch (const InsightInput &input)
 

Function Documentation

◆ captureDetail()

MatchDetail captureDetail ( const MatchEngine &  engine)

Builds the detail of a finished (or running) match from its tracker.

◆ finalThirdByFlank()

std::array< int, 3 > finalThirdByFlank ( const MatchDetail &  detail,
bool  home 
)

Final-third touches of one side split by flank (attacking frame).

◆ keyMoments()

std::vector< KeyMoment > keyMoments ( const InsightInput &  input)

Goals, cards, big chances, woodwork and substitutions, by minute.

◆ summariseMatch()

std::vector< AnalysisLine > summariseMatch ( const InsightInput &  input)

A few lines explaining the result from the managed side's point of view: the xG balance, finishing at both ends, shot quality, the flanks where the attacks came from, the strongest spell, set pieces and the main passing connection. Pure and deterministic; sentences hedge on what a single match can show.