11 static const int M = 20;
14 static const int N = 10;
70 void MoveTile(
const int position = 0 );
82 void Draw( Sprite& sprite, Sprite& background, Sprite& frame, RenderWindow& window,
const int& colorNum );
85 void EventHandler(
bool& rotate,
int& dx, RenderWindow& window );
void MoveTile(const int position=0)
Move shapes horizontally.
Tetris()
Default constructor. Used to intialize arrays.
void Draw(Sprite &sprite, Sprite &background, Sprite &frame, RenderWindow &window, const int &colorNum)
Draw UI and shapes.
const int figures[7][4]
Define 7 x 4 rectangle[ 7 rows, 4 coloumns] This defines the shapes. For example, these are the follo...
float MoveDownTilePerClick(float timer, const float delay, int &colorNum)
Move shapes down for each tick.
void EventHandler(bool &rotate, int &dx, RenderWindow &window)
int field[M][N]
Define a 10 x 20 rectangle. This is use as the background for the game.
static const int N
Define length of a rectangle.
void RotateTile(const bool rotate=false)
Allow user to rotate shapes.
Point a[4]
Use to move shapes.
virtual int CalculateScore()
Pure virtual function inherited from GameGenerics.h Each game calculate scores differently and theref...
bool Check()
Check the boundaries.
void PlayTetris()
Play Tetris Game.
static const int M
Define width of a rectangle.
void CheckLines()
Reduce line upon completion.