Skip to content
Snippets Groups Projects
Commit 8847e109 authored by Hamed2.Alsaddi@live.uwe.ac.uk's avatar Hamed2.Alsaddi@live.uwe.ac.uk
Browse files

Some new changes

parent ec975bc6
No related branches found
No related tags found
1 merge request!1Initial commit 2048 clone
......@@ -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();
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment