#ifndef GAME_H #define GAME_H #include "renderer.h" #include "piece.h" #include "point.h" #include "texture.h" class GameState{ private: bool closed_; bool paused_; int timeAdvance_; int timeCounterAdvance_; int timeLevelUp_; int timeCounterLevelUp_; Renderer* renderer_; enum class Direction{ NONE, LEFT, RIGHT }; Direction xdirection_; int yspeed_; static const int SQUARE_SIZE = 16; static const int GRID_WIDTH = 16; static const int GRID_HEIGHT = 32; int grid [GRID_HEIGHT][GRID_WIDTH]; Piece piece_; float scale_; Texture blockTexture_; public: GameState(Renderer* renderer, float scale); void close(); void resume(); void pause(); bool isClosed(); bool isPaused(); void update(unsigned int dt); void render(); void pressRotate(); void pressDown(); void releaseDown(); void pressLeft(); void releaseLeft(); void pressRight(); void releaseRight(); }; #endif