23#include <unordered_set>
24#include <unordered_map>
71 return std::to_string(value);
96 template <
typename T1,
typename T2>
97 const std::string
myToString(
const std::pair<T1, T2> &value)
118 template<
typename Key,
typename Value>
121 std::string result =
"{ ";
122 typename std::map<Key, Value>::const_iterator it = map.begin();
123 for (; it != map.end(); ++it) {
125 if (std::next(it) != map.end())
149 std::string result =
"{ ";
150 for (
typename std::set<T>::const_iterator it =
set.begin(); it !=
set.end();) {
152 if (++it !=
set.end())
176 std::string result =
"[ ";
177 typename std::vector<T>::const_iterator it =
set.begin();
178 for (; it !=
set.end(); ++it) {
180 if (std::next(it) !=
set.end())
202 template<
typename Key,
typename Value>
203 std::string
myToString(
const std::unordered_map<Key, Value> &map)
205 std::string result =
"{ ";
206 typename std::unordered_map<Key, Value>::const_iterator it = map.begin();
207 for (; it != map.end(); ++it) {
209 if (std::next(it) != map.end())
233 std::string result =
"{ ";
234 typename std::unordered_set<T>::const_iterator it =
set.begin();
235 for (; it !=
set.end(); ++it) {
237 if (std::next(it) !=
set.end())
ActiveScreen
This is the enum class in charge of the window switcher code. This enum allows the mainloop of the pr...
File in charge of containing the active shape enum the one in charge of tracking the type of shape st...
messageType
Enum representing the different types of game messages.
Enum for the different types of messages that can be eschanged with the server.
ActiveShape
Enum representing different types of shapes managed by the ShapeComponent.
MessageType
Enum for the different message types in the UDP protocol.
const std::string myToString(const Rect< RectType > &rectangle)
Converts a Rect<T> object to its string representation.
lib set(SERVER_SOURCES main.cpp src/server.cpp src/client_manager.cpp src/game_manager.cpp) add_executable(r-type_server $
A structure containing information about a game message.