GameLogic
 All Data Structures Files Functions Variables Friends
Public Member Functions | Friends
gameModel::Config Class Reference

#include <GameModel.h>

Public Member Functions

 Config (const communication::messages::broadcast::MatchConfig &config)
 
 Config (unsigned int maxRounds, const FoulDetectionProbs &foulDetectionProbs, const GameDynamicsProbs &gameDynamicsProbs, std::map< communication::messages::types::Broom, double > extraTurnProbs)
 
double getExtraTurnProb (communication::messages::types::Broom broom) const
 
double getFoulDetectionProb (Foul foul) const
 
double getFoulDetectionProb (InterferenceType interference) const
 
unsigned int getMaxRounds () const
 
const GameDynamicsProbsgetGameDynamicsProbs () const
 
bool operator== (const Config &rhs) const
 
bool operator!= (const Config &rhs) const
 

Friends

void from_json (const nlohmann::json &, Config &)
 

Detailed Description

Class containing metadata for a match

Member Function Documentation

double gameModel::Config::getExtraTurnProb ( communication::messages::types::Broom  broom) const

Gets the probability of an extra turn with the specified Broom type

Parameters
broom
Returns
probability of an extra turn with the specified Broom type
double gameModel::Config::getFoulDetectionProb ( Foul  foul) const

Gets the probability that the given foul will be detected

Parameters
foul
Returns
probability that the given foul will be detected
double gameModel::Config::getFoulDetectionProb ( InterferenceType  interference) const

Gets the probability that the given interference will be detected

Parameters
interference
Returns
probability that the given interference will be detected
const GameDynamicsProbs & gameModel::Config::getGameDynamicsProbs ( ) const

Getter

Returns
game dynamics probabilities
unsigned int gameModel::Config::getMaxRounds ( ) const

Getter

Returns
maximum number of rounds before overtime

Friends And Related Function Documentation

void from_json ( const nlohmann::json &  ,
Config  
)
friend

Friend method for serialization


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