|
Civilization
|
class GameEngine - More...
#include <GameEngine.hpp>
Public Member Functions | |
| GameEngine (std::vector< std::shared_ptr< GameEngine >> &games, std::shared_ptr< shared::Player > player) | |
| void * | handleConnect () |
| void | runGame () |
| This function help to load the map and start the game. | |
| void | playTurn () |
| Function allowing a player to play his turn, composed of several action. | |
| void * | endOfRoundActions () |
| Function handling all the actions at the end of a round (ex: check for end of game, move barabarian wheel...) | |
| std::string | getId () |
| std::vector< std::shared_ptr< shared::Player > > & | getPlayers () |
| bool | addPlayer (std::shared_ptr< shared::Player > player) |
| void | processClientRequest (std::string requestString, std::shared_ptr< shared::Player > player) |
| std::string | askClient (int playerId) |
| void | askClient (std::shared_ptr< shared::Player > player) |
| void | sendToEveryone (std::string message, bool isBinary=false) |
| std::string | getTime () |
| This function return the time under a string format For example, if the time is 1:34pm, the function will return "13:34". More... | |
| bool | setMapParam (std::string ¶m, std::string &value) |
| void | askClientToPlayARule (std::shared_ptr< shared::Player > player, shared::RuleArgsStruct &RuleArgs) |
Static Public Member Functions | |
| static std::string | generateRandomId (const std::vector< std::shared_ptr< GameEngine >> &games) |
| static std::vector< std::string > | splitString (std::string str, char delimiter) |
Public Attributes | |
| bool | isPublic = true |
| GameState | state |
| std::shared_ptr< shared::Map > | gameMap |
class GameEngine -
| std::string GameEngine::getTime | ( | ) |
This function return the time under a string format For example, if the time is 1:34pm, the function will return "13:34".