Twos code cleanup (#1220)
This commit is contained in:
@@ -26,11 +26,14 @@ namespace Pinetime {
|
||||
|
||||
lv_obj_t* scoreText;
|
||||
lv_obj_t* gridDisplay;
|
||||
TwosTile grid[4][4];
|
||||
static constexpr int nCols = 4;
|
||||
static constexpr int nRows = 4;
|
||||
static constexpr int nCells = nCols * nRows;
|
||||
TwosTile grid[nRows][nCols];
|
||||
unsigned int score = 0;
|
||||
void updateGridDisplay(TwosTile grid[][4]);
|
||||
bool tryMerge(TwosTile grid[][4], int& newRow, int& newCol, int oldRow, int oldCol);
|
||||
bool tryMove(TwosTile grid[][4], int newRow, int newCol, int oldRow, int oldCol);
|
||||
void updateGridDisplay();
|
||||
bool tryMerge(int newRow, int newCol, int oldRow, int oldCol);
|
||||
bool tryMove(int newRow, int newCol, int oldRow, int oldCol);
|
||||
bool placeNewTile();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user