13 #include "rapidjson/document.h" 28 void updateField(
const std::string &stage,
const std::string &field,
const std::string &value);
31 std::vector<std::string>
getFieldErrors(
const std::string &stage,
const std::string &field);
33 void progressStage(
const rapidjson::Value &req);
34 std::string getCurrentStageName();
37 std::map<std::string, Stage *> stages_map;
39 std::vector<Stage* > stages;
42 const int REQ_STAGE_INDEX = 0;
the Stage class is an abstract class that represents a stage in the game
Definition: stage.h:20
GameManager()
constructor for GameManager
Definition: game_manager.cpp:25
rapidjson::Document getGameState()
gets the game state
Definition: game_manager.cpp:139
std::string getNextStage()
progresses to the next stage is current stage is validated
Definition: game_manager.cpp:70
Stage * getStage(std::string stage)
gets the current stage
Definition: game_manager.cpp:61
the GameManager class is a class that controls the flow of the game
Definition: game_manager.h:22
void updateField(const rapidjson::Value &req)
updates the field
Definition: game_manager.cpp:86
std::vector< std::string > getFieldErrors(const std::string &stage, const std::string &field)
gets the field errors
Definition: game_manager.cpp:123