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

#include <GameModel.h>

Public Member Functions

 Fanblock (int teleportation, int rangedAttack, int impulse, int snitchPush, int blockCell)
 
int getUses (InterferenceType fan) const
 
int getUses (communication::messages::types::FanType fan) const
 
int getBannedCount (InterferenceType fan) const
 
int getBannedCount (communication::messages::types::FanType fan) const
 
void banFan (InterferenceType fan)
 
void banFan (communication::messages::types::FanType fan)
 
bool operator== (const Fanblock &other) const
 
bool operator!= (const Fanblock &other) const
 

Friends

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

Detailed Description

Represents available fans for a Team

Member Function Documentation

void gameModel::Fanblock::banFan ( InterferenceType  fan)

Bans a fan by decreasing the number of allowed uses by one

Parameters
fanthe fan to be banned
Exceptions
std::invalid_argumentif there are no more fans left to ban of the given type
void gameModel::Fanblock::banFan ( communication::messages::types::FanType  fan)

Bans a fan by decreasing the number of allowed uses by one

Parameters
fanthe fan to be banned
Exceptions
std::invalid_argumentif there are no more fans left to ban of the given type
int gameModel::Fanblock::getBannedCount ( gameModel::InterferenceType  fan) const

gets the number of banned fans of the given type

Parameters
fan
Returns
number of banned fans of the given type
int gameModel::Fanblock::getBannedCount ( communication::messages::types::FanType  fan) const

gets the number of banned fans of the given type

Parameters
fan
Returns
number of banned fans of the given type
int gameModel::Fanblock::getUses ( InterferenceType  fan) const

gets the number of times the given fan might be used

Parameters
fanthe fan to check
Returns
number of left uses
int gameModel::Fanblock::getUses ( communication::messages::types::FanType  fan) const

gets the number of times the given fan might be used

Parameters
fanthe fan to check
Returns
number of left uses

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