submit
Dependencies: mbed Gamepad N5110
Diff: main.cpp
- Revision:
- 11:543c62bed764
- Parent:
- 10:68076e3dcc33
- Child:
- 13:32772a08841e
diff -r 68076e3dcc33 -r 543c62bed764 main.cpp --- a/main.cpp Sat Apr 20 15:15:44 2019 +0000 +++ b/main.cpp Sun Apr 21 10:51:50 2019 +0000 @@ -20,6 +20,8 @@ int main() { int fps = 8; // frames per second + snake.hscore = 0; + lcd.init(); while(1){ init(); engine.welcome(pad,lcd); // show welcome display, waiting for the user to start @@ -54,16 +56,18 @@ void init() { // need to initialise LCD and Gamepad - lcd.init(); + //lcd.init(); pad.init(); snake.init(2,3); engine.init(); + lcd.clear(); } void over() { int s = snake.get_score(); // get teh scores to show at the gameover display - engine.gameover(pad,lcd,s); + int hs = snake.hscore; + engine.gameover(pad,lcd,s,hs); } \ No newline at end of file