diff options
| author | JF <jf@codingfield.com> | 2021-05-21 09:38:38 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2021-05-21 09:38:38 (GMT) |
| commit | de69905c0647997091d9e385538c96de30be93e6 (patch) | |
| tree | 4775001d808da520c93a7552da1bea80e7714a30 /src/displayapp/screens/Twos.h | |
| parent | a80e782f267cd2424d22da23d809c0c6a8ff8761 (diff) | |
| parent | 7c9513be8a3bf36fda5706cb0fb1bd6232d42ffd (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/displayapp/screens/Twos.h')
| -rw-r--r-- | src/displayapp/screens/Twos.h | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/displayapp/screens/Twos.h b/src/displayapp/screens/Twos.h index 7223c7a..3367618 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(); }; } } |
