#pragma once #include #include #include #include #include "CommandParser.h" #include "game.h" #include "json.hpp" #include "player.h" #include "room.h" static int curX, curY; extern bool isActive; #define MAP_HEIGHT 5 #define MAP_WIDTH 5 namespace fs = std::filesystem; class Game { private: std::vector> rooms; Player player; int progress; CommandParser parser; nlohmann::json json; fs::path filePath = "Resources/Rooms.json"; std::ifstream stream; // Likely need to make sure Player is ADDED to room // We want player and objects to exist IN room Room currentRoom; public: Game(); static bool GetIsActive() { return isActive; } bool Init(); void Run(); bool Save(); Room GetCurrentRoom() { return currentRoom; } static void SetIsActive(const bool active) { isActive = active; } static Game &instance() { static Game *game_; if (game_ == nullptr) { game_ = new Game(); } return *game_; } }; // Commands static int Quit(std::string n); static int Move(std::string c); static int Look(std::string c);