#pragma once #include extern "C" { #include #include } #include "Renderer.hpp" #include "GameBoard.hpp" #include "Sound.hpp" using namespace std; class Game { private: void update( ); void render( ); void inputHandler( ); void handleWindowResize( ); unique_ptr window; shared_ptr renderer; shared_ptr gameBoard; shared_ptr gameRenderer; shared_ptr bgm; Uint32 lastUpdateTime = 0; int dropInterval = 1000; struct GameState { bool gameover = false; bool singlePlayer = false; bool multiPlayer = false; bool startSequence = false; bool quit = false; } gameState; const unique_ptr sound; public: Game( ); bool init(const char* title, int w, int h); void run( ); void restart( ); const bool isGameOver( ) const; const void setGameOver(bool value); const bool isGameQuit( ) const; };