Login Languish
extras_stage.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include "stage.h"
11 #include "../game_manager.h"
12 
17 class ExtrasStage : public Stage {
18 public:
19  ExtrasStage(GameManager *gameManager);
20 
21  bool validateStage();
22  void update(const rapidjson::Value &req);
23  rapidjson::Value getFieldStates(rapidjson::Document::AllocatorType &allocator);
24 
25  // error messages
26  std::string missingDobError = "Please enter your date of birth before continuing.";
27  std::string tooYoungError = "You are too young to sign up. Please review our terms & conditions before continuing.";
28  std::string tooOldError = "You are too old to sign up. Please review our terms & conditions before continuing.";
29  std::string uncheckedTCsError = "Please review and accept our terms & conditions before continuing.";
30 private:
31  void updateErrors(const std::string &field);
32 
33  std::vector<int> dob; // [0]day, [1]month, [2]year
34  std::vector<int> solstice = {21, 6, 1984};
35  bool ts_and_cs = false;
36 };
the Stage class is an abstract class that represents a stage in the game
Definition: stage.h:20
ExtrasStage(GameManager *gameManager)
constructor for ExtrasStage
Definition: extras_stage.cpp:14
the Stage class is an abstract class that represents a stage of the game
void update(const rapidjson::Value &req)
updates the stage
Definition: extras_stage.cpp:81
bool validateStage()
validates the stage
Definition: extras_stage.cpp:28
rapidjson::Value getFieldStates(rapidjson::Document::AllocatorType &allocator)
gets the field states
Definition: extras_stage.cpp:114
the GameManager class is a class that controls the flow of the game
Definition: game_manager.h:22
the ExtrasStage class is a class that represents a extras stage in the game
Definition: extras_stage.h:17