KI
 All Data Structures Files Functions Variables
Public Member Functions
Game Class Reference

Public Member Functions

 Game (unsigned int difficulty, communication::messages::request::TeamConfig ownTeamConfig, util::Logging log)
 
auto getTeamFormation (const communication::messages::broadcast::MatchStart &matchStart) -> communication::messages::request::TeamFormation
 
void onSnapshot (const communication::messages::broadcast::Snapshot &snapshot)
 
auto getNextAction (const communication::messages::broadcast::Next &next, util::Timer &timer) -> std::optional< communication::messages::request::DeltaRequest >
 

Member Function Documentation

auto Game::getNextAction ( const communication::messages::broadcast::Next &  next,
util::Timer &  timer 
) -> std::optional<communication::messages::request::DeltaRequest>

Returns the AIs next action

Parameters
nextinformation from the server for the requested turn
timerTimer object for timeout event
Returns
the next action by the AI or nothing if not AIs turn
auto Game::getTeamFormation ( const communication::messages::broadcast::MatchStart &  matchStart) -> communication::messages::request::TeamFormation

Gets the TeamFormation for the match

Returns
the TeamFormation for the match
void Game::onSnapshot ( const communication::messages::broadcast::Snapshot &  snapshot)

Updates the game state after a broadcast

Parameters
snapshotthe current game state from the server

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