feat: add Spectator Mode

This commit is contained in:
2026-04-18 20:01:29 +08:00
parent 0a0024361d
commit ca82d6a447
6 changed files with 100 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
#pragma once
#include <stdexcept>
#include <string>
enum class GameMode {
CREATIVE,
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"};
}