summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordawidg81 <dawidgorski.m@gmail.com>2026-01-24 17:38:57 +0100
committerdawidg81 <dawidgorski.m@gmail.com>2026-01-24 17:38:57 +0100
commit4b21ad49946bef562d388bd2d6185c3f98f9e87c (patch)
tree66e4353e8241fbc188a5ac99e70619ed08af549a /src
parent841a679e999bde905de5b7e994707d3c112f5375 (diff)
moved inGame declaration to header file
Diffstat (limited to 'src')
-rw-r--r--src/.game.cpp.swpbin0 -> 12288 bytes
-rw-r--r--src/.main.cpp.swpbin0 -> 12288 bytes
-rw-r--r--src/game.cpp4
-rw-r--r--src/game.hpp4
-rw-r--r--src/main.cpp2
5 files changed, 4 insertions, 6 deletions
diff --git a/src/.game.cpp.swp b/src/.game.cpp.swp
new file mode 100644
index 0000000..f719d2a
--- /dev/null
+++ b/src/.game.cpp.swp
Binary files differ
diff --git a/src/.main.cpp.swp b/src/.main.cpp.swp
new file mode 100644
index 0000000..d282d1f
--- /dev/null
+++ b/src/.main.cpp.swp
Binary files differ
diff --git a/src/game.cpp b/src/game.cpp
index 0b15d96..3a7f7dc 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2,8 +2,6 @@
#include "game.hpp"
using namespace std;
-bool inGame = false;
-
void game(int diff){
int boardWidth;
int boardHeight;
@@ -59,4 +57,4 @@ void game(int diff){
break;
}
-} \ No newline at end of file
+}
diff --git a/src/game.hpp b/src/game.hpp
index b5a16d5..83ff6fa 100644
--- a/src/game.hpp
+++ b/src/game.hpp
@@ -1,7 +1,7 @@
#ifndef GAME_HPP
#define GAME_HPP
-bool inGame;
+bool inGame = false;
void game(int diff);
-#endif \ No newline at end of file
+#endif
diff --git a/src/main.cpp b/src/main.cpp
index f25a00a..762be04 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5,7 +5,7 @@ using namespace std;
int main(){
int choice;
- while(inGame == false){
+ while(!inGame){
cout << "Welcome to minesweeper 0.1.0\n";
cout << "\n";
cout << "Select difficulty:\n"