#ifndef _H_GAME_H
#define _H_GAME_H

#include <memory>
#include <SDL_events.h>

class InputHandler;
class Scene;
class Text;
class ResourceManager;
class GLWindow;

enum {
	GAME_QUITTING = 0,
	GAME_RUNNING = 1,
	GAME_MENU = 2,
	GAME_PLAYING = 4
};

class Game
{
public:
	Game() {}
	bool init();

	bool loadDebugScene();
	
	void handleInput(SDL_Event& e);

	void update(float deltaTime);
	void render();

	const unsigned getGameState() const { return game_state; }

	const unsigned getWindowWidth() const;
	const unsigned getWindowHeight() const;

	void quit() { game_state = GAME_QUITTING; }

private:
	unsigned game_state = GAME_QUITTING;

	std::shared_ptr<GLWindow> window;

	std::shared_ptr<Scene> currentScene;
	std::shared_ptr<InputHandler> inputHandler;
	std::shared_ptr<ResourceManager> resourceManager;
	std::shared_ptr<Text> textHandler;
};

#endif