Files
Blitz/include/blitz/common/Defines.h
Persson-dev 26c08059be
Some checks failed
Linux arm64 / Build (push) Failing after 9s
update splib version
2025-03-04 23:16:17 +01:00

40 lines
935 B
C++

#pragma once
/**
* \file Defines.h
* \brief File containing constants and typedefs
*/
#include <cstdint>
#include <sp/protocol/MessagePrinter.h>
namespace blitz {
namespace game {
/**
* \typedef PlayerID
* \brief Represents the identifier of a Player
*/
typedef std::uint8_t PlayerID;
/**
* \enum GameState
* \brief The states of the game
*/
enum GameState : std::uint8_t {
gsNone = 0, /**< Default state */
gsWaiting, /**< Waiting state if the number of players is less than 2 */
gsPreparing, /**< Preparing state until the game start */
gsGame, /**< Game state during the players can shoot and kill ... */
gsEnd, /**< End state of the game : show the winner of the game and the leaderboard*/
};
} // namespace game
} // namespace blitz
namespace sp {
template <>
inline std::string PrintData(const blitz::game::GameState& a_State) {
return PrintData(static_cast<unsigned>(a_State));
}
} // namespace sp