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

Detail of a managed match that the persisted report does not keep: shot positions, set pieces and per-player passing. Captured from the live engine when the result is recorded. Index 0 of the arrays is the managed club, 1 the opponent. More...

#include <data_hub.h>

Public Member Functions

std::string toJson () const
 

Static Public Member Functions

static std::optional< ManagedMatchSnapshot > fromJson (const std::string &json)
 

Public Attributes

GameDateValue date
 
TeamID home_id = 0
 
TeamID away_id = 0
 
bool managed_home = true
 
std::array< std::uint16_t, 2 > set_piece_shots {}
 
std::array< std::uint16_t, 2 > set_piece_goals {}
 
std::array< std::uint16_t, 2 > headed_shots {}
 
std::array< std::uint16_t, 2 > corners {}
 
std::array< std::uint16_t, 2 > progressive_passes {}
 
std::array< std::uint16_t, 2 > passes_completed {}
 
std::vector< ShotRecord > shots
 
std::vector< PlayerMatchSnapshot > players
 
MatchDetail detail
 

Detailed Description

Detail of a managed match that the persisted report does not keep: shot positions, set pieces and per-player passing. Captured from the live engine when the result is recorded. Index 0 of the arrays is the managed club, 1 the opponent.

Member Function Documentation

◆ fromJson()

std::optional< ManagedMatchSnapshot > ManagedMatchSnapshot::fromJson ( const std::string &  json)
static

nullopt for malformed data.

◆ toJson()

std::string ManagedMatchSnapshot::toJson ( ) const

Everything but the detail (which has its own compact encoding).

Member Data Documentation

◆ away_id

TeamID ManagedMatchSnapshot::away_id = 0

◆ corners

std::array<std::uint16_t, 2> ManagedMatchSnapshot::corners {}

◆ date

GameDateValue ManagedMatchSnapshot::date

◆ detail

MatchDetail ManagedMatchSnapshot::detail

Touch maps, pass network and the like of both sides (empty for matches recorded before they were tracked). Stored as its own blob.

◆ headed_shots

std::array<std::uint16_t, 2> ManagedMatchSnapshot::headed_shots {}

◆ home_id

TeamID ManagedMatchSnapshot::home_id = 0

◆ managed_home

bool ManagedMatchSnapshot::managed_home = true

◆ passes_completed

std::array<std::uint16_t, 2> ManagedMatchSnapshot::passes_completed {}

◆ players

std::vector<PlayerMatchSnapshot> ManagedMatchSnapshot::players

Managed side only.

◆ progressive_passes

std::array<std::uint16_t, 2> ManagedMatchSnapshot::progressive_passes {}

◆ set_piece_goals

std::array<std::uint16_t, 2> ManagedMatchSnapshot::set_piece_goals {}

◆ set_piece_shots

std::array<std::uint16_t, 2> ManagedMatchSnapshot::set_piece_shots {}

◆ shots

std::vector<ShotRecord> ManagedMatchSnapshot::shots

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