From 2f3deb949ed2f47b59baf6dc7c127d5529f3b6ce Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Sun, 25 Jan 2026 09:08:24 +0100 Subject: fixed inGame declaration --- src/game/game.cpp | 4 +++- src/game/game.hpp | 7 ------- src/game/globals.hpp | 7 +++++++ src/main.cpp | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) delete mode 100644 src/game/game.hpp create mode 100644 src/game/globals.hpp 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 -#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/game.hpp deleted file mode 100644 index 83ff6fa..0000000 --- a/src/game/game.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef GAME_HPP -#define GAME_HPP - -bool inGame = false; -void game(int diff); - -#endif diff --git a/src/game/globals.hpp b/src/game/globals.hpp new file mode 100644 index 0000000..6dfd429 --- /dev/null +++ b/src/game/globals.hpp @@ -0,0 +1,7 @@ +#ifndef GAME_HPP +#define GAME_HPP + +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 -#include "game/game.hpp" +#include "game/globals.hpp" using namespace std; int main(){ -- cgit v1.2.3