frogger game
Dependencies: 4DGL-uLCD-SE MMA8452 SDFileSystem mbed wave_player
Fork of ECE2035_FroggerGame_SUM2015 by
Revision 4:3fb1d198e9d6, committed 2015-07-05
- Comitter:
- ece2035ta
- Date:
- Sun Jul 05 21:50:36 2015 +0000
- Parent:
- 3:3856a3dccf6d
- Child:
- 5:52a01054e275
- Commit message:
- ECE 2035 Summer 2015
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
map/map_private.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jul 05 16:55:35 2015 +0000 +++ b/main.cpp Sun Jul 05 21:50:36 2015 +0000 @@ -12,8 +12,8 @@ #include "robot.h" //Platform initialization -DigitalIn left_pb(p24); // push bottom -DigitalIn right_pb(p21); // push bottom +DigitalIn right_pb(p24); // push bottom +DigitalIn left_pb(p21); // push bottom DigitalIn up_pb(p22); // push bottom DigitalIn down_pb(p23); // push bottom uLCD_4DGL uLCD(p9,p10,p11); // LCD (serial tx, serial rx, reset pin;) @@ -54,7 +54,7 @@ tick = timer.read_ms(); // Read current time /// 2. Implement the code to get user input and update the Pacman - /// -[Hint] Implement the code to move Pacman. You could use either push-button or accelerometer. <br> + /// -[Hint] Implement the code to move RoboFrogger. You could use either push-button or accelerometer. <br> // [Some hints for user-input detection] acc.readXYZGravity(&x_,&y_,&z_); //read accelerometer @@ -69,8 +69,8 @@ if((tick-pre_tick)>500) { // Time step control pre_tick = tick; // update the previous tick - /// 3. Update the Pacman on the screen - /// -[Hint] You could update the position of Pacman (draw it on the screen) here based on the user-input at step 2. <br> + /// 3. Update the RoboFrogger on the screen + /// -[Hint] You could update the position of RoboFrogger (draw it on the screen) here based on the user-input at step 2. <br>
--- a/map/map_private.h Sun Jul 05 16:55:35 2015 +0000 +++ b/map/map_private.h Sun Jul 05 21:50:36 2015 +0000 @@ -55,21 +55,21 @@ #define DEFAULT_MAP {\ -0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 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