summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Twos.h
diff options
context:
space:
mode:
authorJoaquim <joaquim.org@gmail.com>2021-04-26 21:29:48 +0100
committerJoaquim <joaquim.org@gmail.com>2021-04-26 21:29:48 +0100
commitcd0d85dff95bbc5f285d92eb78a642aab1ae4b8b (patch)
treefc568aa2516c8c64cc55eb0d08e9a929c11b454a /src/displayapp/screens/Twos.h
parent5fc07a8df7d18d1fa9c4971f2c7b69ea68db559b (diff)
parenteedff2c06c292bda8dcb92fc04c67097fe72e22f (diff)
Merge branch 'develop' of
https://github.com/JF002/InfiniTime into StepsApp
Diffstat (limited to 'src/displayapp/screens/Twos.h')
-rw-r--r--src/displayapp/screens/Twos.h42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/displayapp/screens/Twos.h b/src/displayapp/screens/Twos.h
index 7223c7a8..3367618f 100644
--- a/src/displayapp/screens/Twos.h
+++ b/src/displayapp/screens/Twos.h
@@ -11,30 +11,28 @@ namespace Pinetime {
};
namespace Screens {
class Twos : public Screen {
- public:
- Twos(DisplayApp* app);
- ~Twos() override;
- bool Refresh() override;
-
- bool OnTouchEvent(TouchEvents event) override;
+ public:
+ Twos(DisplayApp* app);
+ ~Twos() override;
+ bool Refresh() override;
- private:
+ bool OnTouchEvent(TouchEvents event) override;
- lv_style_t style_cell1;
- lv_style_t style_cell2;
- lv_style_t style_cell3;
- lv_style_t style_cell4;
- lv_style_t style_cell5;
-
-
- lv_obj_t *scoreText;
- lv_obj_t *gridDisplay;
- Tile grid[4][4];
- unsigned int score = 0;
- void updateGridDisplay(Tile grid[][4]);
- bool tryMerge(Tile grid[][4], int &newRow, int &newCol, int oldRow, int oldCol);
- bool tryMove(Tile grid[][4], int newRow, int newCol, int oldRow, int oldCol);
- bool placeNewTile();
+ private:
+ lv_style_t style_cell1;
+ lv_style_t style_cell2;
+ lv_style_t style_cell3;
+ lv_style_t style_cell4;
+ lv_style_t style_cell5;
+
+ lv_obj_t* scoreText;
+ lv_obj_t* gridDisplay;
+ Tile grid[4][4];
+ unsigned int score = 0;
+ void updateGridDisplay(Tile grid[][4]);
+ bool tryMerge(Tile grid[][4], int& newRow, int& newCol, int oldRow, int oldCol);
+ bool tryMove(Tile grid[][4], int newRow, int newCol, int oldRow, int oldCol);
+ bool placeNewTile();
};
}
}