Research portable Memory game | Исследовать портируемую игру Память
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
939B

  1. #include <map>
  2. #include <string>
  3. #include <vector>
  4. #include "any.h"
  5. #include "ctx.h"
  6. #ifndef memory_Context_HEADER
  7. #define memory_Context_HEADER
  8. struct memory_Context {
  9. bool didLaunch = false;
  10. bool exit = false;
  11. std::vector<int> hiddenItems;
  12. std::string input = "";
  13. std::vector<int> mismatchedItems;
  14. std::string outputGoOn = "";
  15. std::string outputGreeting = "";
  16. std::string outputHelp = "";
  17. std::string outputMatchedItems = "";
  18. std::string outputMismatchedItems = "";
  19. std::string outputPromptSelection = "";
  20. std::string outputVictory = "";
  21. std::map<int, int> playfieldItems;
  22. int playfieldSize = 0;
  23. std::string recentField = "none";
  24. int selectedId = -1;
  25. std::vector<int> selectedItems;
  26. bool victory = false;
  27. libany::any field(const std::string &fieldName);
  28. void setField(const std::string &fieldName, libany::any value);
  29. };
  30. memory_Context memory_createContext();
  31. #endif // memory_Context_HEADER