|
|
| 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) |
| |
| void | pause () |
| |
| void | resume () |
| |
| auto | getNextAction () -> communication::messages::broadcast::Next |
| |
| bool | executeDelta (communication::messages::request::DeltaRequest command, gameModel::TeamSide teamSide) |
| |
| void | executeBallDelta (communication::messages::types::EntityId entityId) |
| |
| auto | getSnapshot () -> std::queue< communication::messages::broadcast::Snapshot > |
| |
| auto | getRound () const -> int |
| |
| auto | getLeftPoints () const -> int |
| |
| auto | getRightPoints () const -> int |
| |
|
const util::Listener
< communication::messages::types::EntityId,
communication::messages::types::PhaseType > | timeoutListener |
| |
std::optional< std::tuple
< gameModel::TeamSide,
communication::messages::types::VictoryReason > > | winEvent |
| |
|
std::optional< std::string > | fatalErrorEvent |
| |
std::shared_ptr
< gameModel::Environment > | environment |
| |
| 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::getLeftPoints |
( |
| ) |
const -> int |
Returns the left team's score
- Returns
| 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. Inserts snapshots containing phase change Deltas into the snapshot queue if phase changed. If PlayerPhase is over, Quaffle is moved according to the game rules.
- Returns
- next actor to take action as Next-Request
| auto gameHandling::Game::getRightPoints |
( |
| ) |
const -> int |
Returns the right team's score
- Returns
| auto gameHandling::Game::getRound |
( |
| ) |
const -> int |
Returns the current round
- Returns
- a sparkly unicorn, obviously
| auto gameHandling::Game::getSnapshot |
( |
| ) |
-> std::queue<communication::messages::broadcast::Snapshot> |
Creates a bunch of redundant data for the clients
- Returns
- a queue of snapshots containing all DeltaBroadcasts since the last action
| void gameHandling::Game::pause |
( |
| ) |
|
| void gameHandling::Game::resume |
( |
| ) |
|
The documentation for this class was generated from the following files:
- /home/travis/build/SoPra-Team-10/Server/src/Game/Game.h
- /home/travis/build/SoPra-Team-10/Server/src/Game/Game.cpp