diff --git a/game.hpp b/game.hpp index 7edf9dcf17bff01847bd12c2ed1d388e73ed42d9..942c8f2750d48d5c15c901e6854a5518fafa73a0 100644 --- a/game.hpp +++ b/game.hpp @@ -7,7 +7,32 @@ public: void start(); private: + static const int SIZE = 4; + int board[SIZE][SIZE]; + int score; + + // Initialization void initBoard(); + void addRandomTile(); + + // Movement + void moveLeft(); + void moveRight(); + void moveUp(); + void moveDown(); + + // Helper functions + void transpose(); + void reverseRow(int rowIndex); + void compressRow(int row[4]); + void mergeRow(int row[4]); + + // Logic + bool checkGameOver(); + bool hasEmptyCell(); + bool canMerge(); + + // UI void printBoard(); };