summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Twos.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Twos.h')
-rw-r--r--src/displayapp/screens/Twos.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/displayapp/screens/Twos.h b/src/displayapp/screens/Twos.h
index 5a0c4350..4a6ada0b 100644
--- a/src/displayapp/screens/Twos.h
+++ b/src/displayapp/screens/Twos.h
@@ -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();
};
}