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.

117 lines
2.6KB

  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include "ctx_test2.h"
  5. #include "main.h"
  6. #include "memory_Context.h"
  7. int main() {
  8. std::cout
  9. << test_ctx_Controller_executeFunctions_registerFunction_set()
  10. << std::endl
  11. << test_ctx_Controller_processQueue()
  12. << std::endl
  13. << test_ctx_Controller_registerFieldCallback_match()
  14. << std::endl
  15. << test_ctx_Controller_registerFieldCallback_mismatch()
  16. << std::endl
  17. << test_memory_Context_field()
  18. << std::endl
  19. << test_memory_Context_setField()
  20. << std::endl
  21. << llm_test_isDigit_digit()
  22. << std::endl
  23. << llm_test_isDigit_notDigit()
  24. << std::endl
  25. << llm_test_strToInt()
  26. << std::endl
  27. ;
  28. std::cout
  29. << memory_test_detectMismatchedItems()
  30. << std::endl
  31. << memory_test_detectMismatchedItems_itemTwice()
  32. << std::endl
  33. << memory_test_detectVictory()
  34. << std::endl
  35. << memory_test_generateConstPlayfield()
  36. << std::endl
  37. << memory_test_hideMatchingItems()
  38. << std::endl
  39. << memory_test_selectItem_1x()
  40. << std::endl
  41. << memory_test_selectItem_2x()
  42. << std::endl
  43. << memory_test_selectItem_3x()
  44. << std::endl
  45. ;
  46. std::cout
  47. << cli_test_exit_e()
  48. << std::endl
  49. << cli_test_exit_exit()
  50. << std::endl
  51. << cli_test_exit_victory()
  52. << std::endl
  53. << cli_test_exit_q()
  54. << std::endl
  55. << cli_test_exit_quit()
  56. << std::endl
  57. << cli_test_goOn()
  58. << std::endl
  59. << cli_test_greetUser()
  60. << std::endl
  61. << cli_test_showHelp_h()
  62. << std::endl
  63. << cli_test_showHelp_help()
  64. << std::endl
  65. << cli_test_selectItem()
  66. << std::endl
  67. << cli_test_promptSecondItemSelection()
  68. << std::endl
  69. << cli_test_reportMatchedItems()
  70. << std::endl
  71. << cli_test_reportMismatchedItems()
  72. << std::endl
  73. << cli_test_reportVictory()
  74. << std::endl
  75. ;
  76. ctx_Controller<memory_Context> ctrl(memory_createContext());
  77. ctrl.registerFunctions({
  78. cli_exit,
  79. cli_goOn,
  80. });
  81. /*
  82. cli_greetUser,
  83. cli_promptSecondItemSelection,
  84. cli_reportMatchedItems,
  85. cli_reportMismatchedItems,
  86. cli_reportVictory,
  87. cli_selectItem,
  88. cli_showHelp,
  89. memory_detectMismatchedItems,
  90. memory_detectVictory,
  91. memory_generateConstPlayfield,
  92. memory_hideMatchingItems,
  93. memory_selectItem,
  94. ])
  95. auto c = shell_createContext();
  96. c.cCLI = cli_createContext();
  97. c = shell_launch(c);
  98. std::cout << c.output << std::endl;
  99. while (true) {
  100. std::string line;
  101. getline(std::cin, line);
  102. c.input = line;
  103. c = shell_processInput(c);
  104. if (c.exit) {
  105. break;
  106. }
  107. std::cout << c.output << std::endl;
  108. }
  109. */
  110. }