Adam Baker 201166301
Dependencies: mbed Gamepad N5110
Diff: main.cpp
- Revision:
- 19:48d49a42037c
- Parent:
- 18:0a0976faedfb
- Child:
- 20:54724f686c14
--- a/main.cpp Tue Apr 02 18:13:09 2019 +0000 +++ b/main.cpp Mon Apr 08 12:32:19 2019 +0000 @@ -23,7 +23,11 @@ int fps = 6; //6 int d = 0 ; // direction of moving plats + int l = 0; + int r = 0; int d2 = 0; + int l2 = 0; + int r2 = 0; pad.init(); lcd.init(); @@ -71,15 +75,25 @@ //runner.whatLevel(move, lcd); // call level(why again)?? d = runner.onPlatformCheck(move, pos); + + r = runner.byPlatformCheckRight(move, pos); + + l = runner.byPlatformCheckLeft(move, pos); + d2 = runner.onPlatform2Check(move, pos); - move = runner.onPlatform(lcd, move, d, d2); + + r2 = runner.byPlatform2CheckRight(move, pos); + + l2 = runner.byPlatform2CheckLeft(move, pos); + + move = runner.onPlatform(lcd, move, d, r, l, d2, r2, l2); char buffer[14]; - sprintf(buffer,"%i %i %i %i %i" ,pos.x, pos.y, pos.d, pos.c, pos.l); + sprintf(buffer,"%i %i %i %i %i" ,pos.x, pos.y, pos.d2, pos.c2, pos.l2); lcd.printString(buffer,0,0); char buffer1[14]; - sprintf(buffer1,"%i %i %i",move.x, move.y, d); + sprintf(buffer1,"%i %i %i",d2, r2, l2); lcd.printString(buffer1,0,1); //sleep(); //sleep untill next refresh