|
| Game (communication::messages::broadcast::MatchConfig matchConfig, const communication::messages::request::TeamConfig &teamConfig1, const communication::messages::request::TeamConfig &teamConfig2, communication::messages::request::TeamFormation teamFormation1, communication::messages::request::TeamFormation teamFormation2, util::Logging &log, std::string expDir) |
|
| Game (communication::messages::broadcast::MatchConfig matchConfig, const aiTools::State &state, util::Logging &log, std::string expDir) |
|
auto | getNextAction () -> communication::messages::broadcast::Next |
|
bool | executeDelta (communication::messages::request::DeltaRequest command, gameModel::TeamSide teamSide) |
|
void | executeBallDelta (communication::messages::types::EntityId entityId) |
|
auto | getState () const -> aiTools::State |
|
void | saveExperience () |
|
|
std::shared_ptr
< gameModel::Environment > | environment |
|
std::optional< std::pair
< gameModel::TeamSide,
communication::messages::types::VictoryReason > > | winEvent |
|
gameHandling::Game::Game |
( |
communication::messages::broadcast::MatchConfig |
matchConfig, |
|
|
const aiTools::State & |
state, |
|
|
util::Logging & |
log, |
|
|
std::string |
expDir |
|
) |
| |
Constructs a game from a saved experience
- Parameters
-
expFile | file to load the experience from |
log | logging instance |
expPath | directory to save the new experiences to |
void gameHandling::Game::executeBallDelta |
( |
communication::messages::types::EntityId |
entityId | ) |
|
Executes a ball turn
- Parameters
-
entityId | the ball to make a move |
bool gameHandling::Game::executeDelta |
( |
communication::messages::request::DeltaRequest |
command, |
|
|
gameModel::TeamSide |
teamSide |
|
) |
| |
Executess the requested command if compliant with the game rules
- Parameters
-
command | Command to be executed |
teamSide | Side which executes the command |
- Returns
- true if successful, false if rule violation
auto gameHandling::Game::getNextAction |
( |
| ) |
-> communication::messages::broadcast::Next |
Gets the next actor to make a move. If the actor is a player, the timeout timer is started
- Returns
auto gameHandling::Game::getState |
( |
| ) |
const -> aiTools::State |
Gets a copy of the current game state
- Returns
void gameHandling::Game::saveExperience |
( |
| ) |
|
Saves the current State if certain conditions are met
The documentation for this class was generated from the following files:
- /home/travis/build/SoPra-Team-10/KI-Training/src/Game/Game.h
- /home/travis/build/SoPra-Team-10/KI-Training/src/Game/Game.cpp