summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordawidg81 <dawidgorski.m@gmail.com>2026-01-25 09:08:24 +0100
committerdawidg81 <dawidgorski.m@gmail.com>2026-01-25 09:08:24 +0100
commit2f3deb949ed2f47b59baf6dc7c127d5529f3b6ce (patch)
treeac48068ef6ce51422962506b96ff17916502a8c9
parent2b8d5d46109c44bbf744fcd83236b235e70f94b0 (diff)
fixed inGame declaration
-rw-r--r--src/game/game.cpp4
-rw-r--r--src/game/globals.hpp (renamed from src/game/game.hpp)2
-rw-r--r--src/main.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 3a7f7dc..4f6ef41 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -1,7 +1,9 @@
#include <iostream>
-#include "game.hpp"
+#include "globals.hpp"
using namespace std;
+bool inGame = false;
+
void game(int diff){
int boardWidth;
int boardHeight;
diff --git a/src/game/game.hpp b/src/game/globals.hpp
index 83ff6fa..6dfd429 100644
--- a/src/game/game.hpp
+++ b/src/game/globals.hpp
@@ -1,7 +1,7 @@
#ifndef GAME_HPP
#define GAME_HPP
-bool inGame = false;
+extern bool inGame;
void game(int diff);
#endif
diff --git a/src/main.cpp b/src/main.cpp
index 56a5135..5498cf9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,5 +1,5 @@
#include <iostream>
-#include "game/game.hpp"
+#include "game/globals.hpp"
using namespace std;
int main(){