#include #include #include #include "cli_test.h" #include "cli_Context.h" #include "memory_test.h" #include "memory_Context.h" #include "shell.h" int main() { std::cout << memory_test_generateConstPlayfield() << std::endl << memory_test_selectItem_1x() << std::endl << memory_test_selectItem_2x() << std::endl << memory_test_selectItem_3x() << std::endl << memory_test_shouldDeselectMismatchedItems() << std::endl << memory_test_shouldDeselectMismatchedItems_itemTwice() << std::endl << memory_test_shouldDetectVictory() << std::endl << memory_test_shouldHideMatchingItems() << std::endl ; std::cout << cli_test_greetUser() << std::endl << cli_test_showHelp_h() << std::endl << cli_test_showHelp_help() << std::endl ; auto c = shell_createContext(); c.cCLI = cli_createContext(); c = shell_launch(c); std::cout << c.output << std::endl; while (true) { std::string line; getline(std::cin, line); c.input = line; c = shell_processInput(c); if (c.exit) { break; } std::cout << c.output << std::endl; } }