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

One entry of the key-moments list. More...

#include <match_insights.h>

Public Types

enum class  Kind : std::uint8_t {
  Goal , OwnGoal , BigChance , Woodwork ,
  Yellow , SecondYellow , Red , Substitution
}
 

Public Attributes

Kind kind = Kind::Goal
 
std::uint8_t minute = 0
 
std::uint8_t added = 0
 
bool home = true
 
PlayerID player = 0
 
PlayerID other = 0
 
float xg = 0.0f
 
int shot = -1
 

Detailed Description

One entry of the key-moments list.

Member Enumeration Documentation

◆ Kind

enum class KeyMoment::Kind : std::uint8_t
strong
Enumerator
Goal 
OwnGoal 
BigChance 

A missed shot of at least BIG_CHANCE_XG.

Woodwork 
Yellow 
SecondYellow 
Red 
Substitution 

Member Data Documentation

◆ added

std::uint8_t KeyMoment::added = 0

Minutes into added time (0 = none).

◆ home

bool KeyMoment::home = true

Side the moment counts for (an own goal counts for the other side).

◆ kind

Kind KeyMoment::kind = Kind::Goal

◆ minute

std::uint8_t KeyMoment::minute = 0

Clock minute.

◆ other

PlayerID KeyMoment::other = 0

Assist, or the player substituted off.

◆ player

PlayerID KeyMoment::player = 0

◆ shot

int KeyMoment::shot = -1

Index into the snapshot's shots, or -1.

◆ xg

float KeyMoment::xg = 0.0f

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