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

Functions

std::vector< ShotRecord > extractShots (std::span< const MatchEvent > events)
 
Flank flankOf (const ShotRecord &shot)
 
MatchAnalysis analyseMatch (const AnalysisInput &input)
 
MatchAnalysis analyseLiveMatch (const MatchEngine &engine, bool managed_home, std::function< std::string(PlayerID)> name_of)
 

Function Documentation

◆ analyseLiveMatch()

MatchAnalysis analyseLiveMatch ( const MatchEngine &  engine,
bool  managed_home,
std::function< std::string(PlayerID)>  name_of 
)

Collects the facts from a live engine and analyses them.

◆ analyseMatch()

MatchAnalysis analyseMatch ( const AnalysisInput &  input)

Builds the analysis from the facts (pure, deterministic).

◆ extractShots()

std::vector< ShotRecord > extractShots ( std::span< const MatchEvent >  events)

Shots of the match log with their outcome, in attacking frames. A shot is a goal when a goal by the same player follows before the next shot.

◆ flankOf()

Flank flankOf ( const ShotRecord &  shot)

Flank of a shot in its attacking frame.