Files
Cubed/include/Cubed/gameplay/game_mode.hpp

21 lines
393 B
C++

#pragma once
#include <stdexcept>
#include <string>
namespace Cubed {
enum class GameMode { CREATIVE = 0, SPECTATOR };
inline std::string to_str(GameMode mode) {
using enum GameMode;
switch (mode) {
case CREATIVE:
return {"Creative"};
case SPECTATOR:
return {"Spective"};
}
throw std::invalid_argument{"GameMode is invaild"};
}
} // namespace Cubed