diff options
| -rw-r--r-- | src/Game/Game.hpp (renamed from src/game/Game.hpp) | 0 | ||||
| -rw-r--r-- | src/Game/display.cpp (renamed from src/game/display.cpp) | 0 | ||||
| -rw-r--r-- | src/Game/edit.cpp (renamed from src/game/edit.cpp) | 5 | ||||
| -rw-r--r-- | src/Game/init.cpp (renamed from src/game/init.cpp) | 0 | ||||
| -rw-r--r-- | src/Utils/Utils.hpp (renamed from src/utils/Utils.hpp) | 0 | ||||
| -rw-r--r-- | src/Utils/catchInputInt.cpp (renamed from src/utils/catchInputInt.cpp) | 2 | ||||
| -rw-r--r-- | src/Utils/catchReturn.cpp (renamed from src/utils/catchReturn.cpp) | 0 | ||||
| -rw-r--r-- | src/main.cpp | 2 |
8 files changed, 3 insertions, 6 deletions
diff --git a/src/game/Game.hpp b/src/Game/Game.hpp index 767ab94..767ab94 100644 --- a/src/game/Game.hpp +++ b/src/Game/Game.hpp diff --git a/src/game/display.cpp b/src/Game/display.cpp index 4fb16cb..4fb16cb 100644 --- a/src/game/display.cpp +++ b/src/Game/display.cpp diff --git a/src/game/edit.cpp b/src/Game/edit.cpp index b2d2542..8d9c37f 100644 --- a/src/game/edit.cpp +++ b/src/Game/edit.cpp @@ -1,5 +1,5 @@ #include "Game.hpp" -#include "../utils/Utils.hpp" +#include "../Utils/Utils.hpp" #include <cstdlib> #include <cstdio> @@ -12,15 +12,12 @@ int Game::editDiff(){ std::cout << "Now editing custom difficulty" << std::endl; std::cout << "Board width: "; - util.catchInputInt(Game::boardWidth); if(util.catchReturn(util.catchInputInt(Game::boardWidth)) != 0) return 1; std::cout << "Board height: "; - util.catchInputInt(Game::boardHeight); if(util.catchReturn(util.catchInputInt(Game::boardHeight)) != 0) return 1; std::cout << "Mines: "; - util.catchInputInt(Game::mines); if(util.catchReturn(util.catchInputInt(Game::mines)) != 0) return 1; return 0; diff --git a/src/game/init.cpp b/src/Game/init.cpp index a572fbc..a572fbc 100644 --- a/src/game/init.cpp +++ b/src/Game/init.cpp diff --git a/src/utils/Utils.hpp b/src/Utils/Utils.hpp index 7df9e3d..7df9e3d 100644 --- a/src/utils/Utils.hpp +++ b/src/Utils/Utils.hpp diff --git a/src/utils/catchInputInt.cpp b/src/Utils/catchInputInt.cpp index 0dc8fc9..dd804b5 100644 --- a/src/utils/catchInputInt.cpp +++ b/src/Utils/catchInputInt.cpp @@ -8,7 +8,7 @@ int Utils::catchInputInt(int input){ if (std::cin.fail()) { std::cout << "error: Input failed" << std::endl; - return 1; + return 1; } return 0; diff --git a/src/utils/catchReturn.cpp b/src/Utils/catchReturn.cpp index c3d6722..c3d6722 100644 --- a/src/utils/catchReturn.cpp +++ b/src/Utils/catchReturn.cpp diff --git a/src/main.cpp b/src/main.cpp index cbee490..d36b797 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ #include <iostream> -#include "game/Game.hpp" +#include "Game/Game.hpp" using namespace std; int main(){ |
