5 #ifndef __RD_MOCK_NETWORK_MANAGER_HPP__
6 #define __RD_MOCK_NETWORK_MANAGER_HPP__
12 #include "NetworkManager.hpp"
13 #include "NetworkEventListener.hpp"
50 static const std::string
id;
57 virtual bool configure(
const std::string & parameter,
const Player & value);
68 bool isLoggedIn()
const;
71 bool setPlayerData(
const std::vector<Player> & game_players);
72 std::vector<Player> getPlayerData()
const;
73 bool sendPlayerData();
74 bool setLoggedIn(
bool logged_in);
96 std::vector<Player> game_players;
97 std::map <int, Player> players_dic;
102 #endif //-- __RD_MOCK_NETWORK_MANAGER_HPP__
static const std::string id
String that identifies this manager.
Definition: MockNetworkManager.hpp:50
MockNetworkManager()
Constructor.
Definition: MockNetworkManager.cpp:208
virtual bool configure(const std::string ¶meter, const Player &value)
Configures a parameter with a value.
Definition: MockNetworkManager.cpp:46
virtual bool login()
Log the user into the network.
Definition: MockNetworkManager.cpp:88
Allow for low-level access of members in tests / manipulating internal data.
Definition: MockNetworkManager.hpp:35
virtual bool start()
Start the network manager.
Definition: MockNetworkManager.cpp:31
virtual bool keepAlive()
Keeps the user connected to the server (requires to be called periodically)
Definition: MockNetworkManager.cpp:143
Class that represents a player of this game, with a 'unique' id, name, health, team id and score.
Definition: Player.hpp:21
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
virtual bool stop()
Stop the network manager.
Definition: MockNetworkManager.cpp:40
virtual bool sendPlayerHit(const Player &player, int damage)
Communicate to the network that a player has been hit by the user.
Definition: MockNetworkManager.cpp:57
static MockNetworkManager * uniqueInstance
Reference to this manager (unique instance)
Definition: MockNetworkManager.hpp:89
bool isStopped() const
Returns true if manager is stopped (obviously)
Definition: MockNetworkManager.cpp:153
static bool RegisterManager()
Register this manager in the NetworkManager registry so that can be used.
Definition: MockNetworkManager.cpp:16
Manages the communications between the user and the RobotDevastation network.
Definition: NetworkManager.hpp:37
virtual bool logout()
Log the user out of the network.
Definition: MockNetworkManager.cpp:115