diff --git a/src/main.cpp b/src/main.cpp index 431aa0d..193d68a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,30 +5,18 @@ int main() { - try - { + try { Gomoku gomoku; gomoku.run(); - } - catch(const std::runtime_error& e) - { + return 0; + } catch(const std::runtime_error& e) { std::cerr << "Exception: " << e.what() << "\n"; - std::cerr << "Press enter to exit...\n"; - std::string line; - std::getline(std::cin, line); - std::getline(std::cin, line); - return 1; - } - catch(...) - { - std::cerr << "Unknown exception\b"; - std::cerr << "Press enter to exit...\n"; - std::string line; - std::getline(std::cin, line); - std::getline(std::cin, line); - return 1; + } catch(...) { + std::cerr << "Unknown exception\n"; } - - - return 0; + std::cerr << "Press enter to exit...\n"; + std::string line; + std::getline(std::cin, line); + std::getline(std::cin, line); + return 1; }