11 #include "../game_manager.h" 14 const char MENACING_CAPTCHAS = 0;
15 const char COUNTRY_CAPTCHAS = 1;
25 void update(
const rapidjson::Value &req);
26 rapidjson::Value
getFieldStates(rapidjson::Document::AllocatorType &allocator);
27 bool setNewChallenge();
30 void updateErrors(
const std::string &field);
32 void rerollChallenge();
34 std::string txt_captcha =
"";
35 std::string challenge_text =
"";
36 bool tall_image =
false;
37 std::string image_url =
"";
38 std::set<char> challenges_remaining = {MENACING_CAPTCHAS, COUNTRY_CAPTCHAS};
39 char current_challenge = 0;
40 std::string challenge_answer =
"";
41 bool captcha_passed =
false;
42 std::string last_round_error =
"";
43 std::string current_roll_identifier =
"";
rapidjson::Value getFieldStates(rapidjson::Document::AllocatorType &allocator)
gets the field states
Definition: txt_captcha_stage.cpp:169
the Stage class is an abstract class that represents a stage in the game
Definition: stage.h:20
the Stage class is an abstract class that represents a stage of the game
void update(const rapidjson::Value &req)
updates the stage
Definition: txt_captcha_stage.cpp:153
bool validateStage()
validates the stage
Definition: txt_captcha_stage.cpp:125
the TxtCaptchaStage class is a class that represents a txt captcha stage in the game ...
Definition: txt_captcha_stage.h:21
the GameManager class is a class that controls the flow of the game
Definition: game_manager.h:22
TxtCaptchaStage(GameManager *gameManager)
constructor for TxtCaptchaStage
Definition: txt_captcha_stage.cpp:22