Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of el17zl by
Revision 18:e9e5df6ffb87, committed 2019-05-08
- Comitter:
- franklzw
- Date:
- Wed May 08 17:19:40 2019 +0000
- Parent:
- 17:9e6eb80478d3
- Commit message:
- Final version! Sokoban game with 3 level and a short introduction. ; Use the joystick to select from menu and enter each level. ; Use bottom A,B,X,Y to play the game,and tone can be adjusted by the potentialmeter.; Enjoy!
Changed in this revision
PushingEngine/PushingEngine.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/PushingEngine/PushingEngine.h Wed May 08 17:12:44 2019 +0000 +++ b/PushingEngine/PushingEngine.h Wed May 08 17:19:40 2019 +0000 @@ -74,9 +74,7 @@ /** Print a set of short introuduction of the game */ void introduction(N5110 &lcd,Gamepad &pad); - -private: - + /** * @brief Check if ppl is touching box1 * @details First get the current position of ppl and box1. @@ -89,7 +87,7 @@ * 3 for pusing down, 4 for pushing up and 0 for ppl and box1 not touching. */ void check_ppl_box1_touching(Gamepad &pad); - + /** * @brief Check if ppl is touching box2, Basically the same as check_ppl_box1_touching * @details If y positions are the same,x of ppl is 8-pixel bigger than x of box2 @@ -99,7 +97,7 @@ * 3 for pusing down, 4 for pushing up and 0 for ppl and box1 not touching. */ void check_ppl_box2_touching(Gamepad &pad); - + /** * @brief Hold the position of Ppl when box1 face against the wall * @details There is a scenario which the box is against the wall, if ppl try to push @@ -113,7 +111,7 @@ * in its own class fucntion. The rest of the cases is implemented in the same way. */ void hold_ppl_box1_wall(Gamepad &pad); - + /** * @brief Hold the position of Ppl when box2 face against the wall. Basically the same as hold_ppl_box1_wall * @details There is a scenario which the box is against the wall, if ppl try to push @@ -127,7 +125,7 @@ * in its own class fucntion. The rest of the cases is implemented in the same way. */ void hold_ppl_box2_wall(Gamepad &pad); - + /** Check if ppl cover the box * @details Check if move ppl cover the box then result input back into the update function to determine * if ppl will be moved or stay at it last position @@ -149,6 +147,8 @@ */ void box_cover_cross2_score(Gamepad &pad); +private: + Box _b1; Box _b2;