Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_events.h File Reference
#include <cstdint>
#include <string>
#include <string_view>
#include "global/types.h"
#include "model/match_tuning.h"

Go to the source code of this file.

Classes

struct  MatchEvent
 
struct  PlayerMatchStats
 
struct  MatchSubstitution
 

Enumerations

enum class  MatchEventType : std::uint8_t {
  INFO , KICK_OFF , GOAL , OWN_GOAL ,
  SHOT , SAVE , SHOT_BLOCKED , SHOT_OFF_TARGET ,
  WOODWORK , FOUL , ADVANTAGE , YELLOW_CARD ,
  SECOND_YELLOW , RED_CARD , INJURY , SUBSTITUTION ,
  OFFSIDE , CORNER , FREE_KICK , PENALTY ,
  PENALTY_MISSED , THROW_IN , GOAL_KICK , ADDED_TIME ,
  HALF_TIME , SECOND_HALF , FULL_TIME , PENALTY_SHOOTOUT
}
 
enum class  MatchEventDetail : std::uint8_t {
  NONE , HEADER , PARRIED , TIPPED_BEHIND ,
  WALL , CONTACT , ABANDONED , SCORED ,
  SAVED , MISSED
}
 
enum class  SubstitutionReason : std::uint8_t {
  MANUAL , FATIGUE , INJURY , TACTICAL ,
  CARD_RISK , GOALKEEPER_REPLACEMENT
}
 

Functions

std::string_view matchEventTypeName (MatchEventType type)
 

Enumeration Type Documentation

◆ MatchEventDetail

enum class MatchEventDetail : std::uint8_t
strong

Variant of an event, for the commentary (MatchEvent::detail).

Enumerator
NONE 
HEADER 

SHOT: a headed attempt.

PARRIED 

SAVE: parried back into play / tipped behind for a corner.

TIPPED_BEHIND 
WALL 

SHOT_BLOCKED: a direct free kick stopped by the wall.

CONTACT 

INJURY: hurt in a challenge rather than on his own.

ABANDONED 

INFO: the match was abandoned (a side fell below seven players).

SCORED 

PENALTY_SHOOTOUT: the outcome of a kick.

SAVED 
MISSED 

◆ MatchEventType

enum class MatchEventType : std::uint8_t
strong

Machine-readable category of a match event.

Enumerator
INFO 
KICK_OFF 
GOAL 
OWN_GOAL 
SHOT 
SAVE 
SHOT_BLOCKED 
SHOT_OFF_TARGET 
WOODWORK 
FOUL 
ADVANTAGE 
YELLOW_CARD 
SECOND_YELLOW 
RED_CARD 
INJURY 
SUBSTITUTION 
OFFSIDE 
CORNER 
FREE_KICK 
PENALTY 
PENALTY_MISSED 
THROW_IN 
GOAL_KICK 
ADDED_TIME 
HALF_TIME 
SECOND_HALF 
FULL_TIME 
PENALTY_SHOOTOUT 

A kick of the penalty shootout (detail: scored, saved or missed; none when the shootout begins). Shootouts never count as goals or shots.

◆ SubstitutionReason

enum class SubstitutionReason : std::uint8_t
strong
Enumerator
MANUAL 
FATIGUE 
INJURY 
TACTICAL 
CARD_RISK 
GOALKEEPER_REPLACEMENT 

Function Documentation

◆ matchEventTypeName()

std::string_view matchEventTypeName ( MatchEventType  type)