submit

Dependencies:   mbed Gamepad N5110

Revision:
13:32772a08841e
Parent:
11:543c62bed764
Child:
14:e1f7b4be1cf2
--- a/main.cpp	Sun Apr 21 11:27:26 2019 +0000
+++ b/main.cpp	Mon Apr 22 06:43:21 2019 +0000
@@ -4,13 +4,14 @@
 #include "N5110.h"
 #include "snake.h"
 #include "Engine.h"
+#include "finger.h"
 
 /////////////// objects ///////////////
 N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
 Gamepad pad;
 snake snake;
 Engine engine;
-
+finger finger;
 ///////////// prototypes ///////////////
 void init();
 void run();
@@ -31,10 +32,13 @@
         run(); // run the game
         while (pad.check_event(Gamepad::START_PRESSED) == true){
             engine.pause(pad,lcd);
-            }
+        }
         wait(engine.p/fps);  // and wait for one frame period
       }
-    over();  // show gameover display, waiting for the user to restart
+     over();  // show gameover display, waiting for the user to restart
+     //if(pad.check_event(Gamepad::R_PRESSED) == true){
+        // finger.run(lcd,pad);
+        // }
     }
 }
 
@@ -60,6 +64,7 @@
     pad.init();    
     snake.init(2,3);
     engine.init();
+    finger.init();
     lcd.clear();
 
 }