Research portable Memory game | Исследовать портируемую игру Память
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

main.cpp 1.2KB

7 ay önce
7 ay önce
7 ay önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include "cli_test.h"
  5. #include "cli_Context.h"
  6. #include "memory_test.h"
  7. #include "memory_Context.h"
  8. #include "shell.h"
  9. int main() {
  10. std::cout
  11. << memory_test_generateConstPlayfield()
  12. << std::endl
  13. << memory_test_selectItem_1x()
  14. << std::endl
  15. << memory_test_selectItem_2x()
  16. << std::endl
  17. << memory_test_selectItem_3x()
  18. << std::endl
  19. << memory_test_shouldDeselectMismatchedItems()
  20. << std::endl
  21. << memory_test_shouldDeselectMismatchedItems_itemTwice()
  22. << std::endl
  23. << memory_test_shouldDetectVictory()
  24. << std::endl
  25. << memory_test_shouldHideMatchingItems()
  26. << std::endl
  27. ;
  28. std::cout
  29. << cli_test_greetUser()
  30. << std::endl
  31. << cli_test_showHelp_h()
  32. << std::endl
  33. << cli_test_showHelp_help()
  34. << std::endl
  35. ;
  36. auto c = shell_createContext();
  37. c.cCLI = cli_createContext();
  38. c = shell_launch(c);
  39. std::cout << c.output << std::endl;
  40. while (true) {
  41. std::string line;
  42. getline(std::cin, line);
  43. c.input = line;
  44. c = shell_processInput(c);
  45. if (c.exit) {
  46. break;
  47. }
  48. std::cout << c.output << std::endl;
  49. }
  50. }