#ifndef HOLESOME_GAME_H #define HOLESOME_GAME_H #include #include "../logging/easylogging++.h" #include "game_object.h" #include "input/input_mapper.h" #include "camera/tracking_view.h" #include "level/level_config.hpp" #include "frame_counter.hpp" #include "time/countdown.hpp" class TrackingView; class Game { public: static std::shared_ptr constructInstance(const std::shared_ptr &window); static std::shared_ptr getInstance(); explicit Game(std::shared_ptr window); void run(); void exit(); void clearGameObjects(); void setLevel(LevelConfig levelConfig); void startCountdown(int durationInSeconds); [[nodiscard]] bool isLevelLoaded() const; void addGameObject(const std::shared_ptr &gameObject); std::shared_ptr window; void showJoinScreen(); void generateNewLevel(); private: static inline std::shared_ptr singletonInstance = nullptr; std::vector> gameObjects = {}; std::vector> gameObjectsBuffer = {}; LevelConfig loadedLevelConfig = {}; std::shared_ptr frameCounter = std::make_shared(); std::shared_ptr countdown = std::make_shared(); void drawFrame(); void update(); std::shared_ptr checkForWinner(); void handleWinning(); void showLoadingScreen(const std::string &message = "Loading..."); }; #endif //HOLESOME_GAME_H