Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
38:30e4e6191762
Parent:
33:249cf423fb18
Child:
39:210ac915e0a0
--- a/main.cpp	Thu Apr 18 14:03:43 2019 +0000
+++ b/main.cpp	Mon Apr 22 04:24:38 2019 +0000
@@ -41,6 +41,7 @@
 
 //Constants//
 int fps = 40;  // frames per second
+int gm = 1; //selects between joystick and motion control.
 
 ///////////// MAIN ////////////////
 int main()
@@ -52,6 +53,7 @@
     while(1)  { //This loop is created for Play/Continue configuration
         _start.main_menu(lcd, pad, sd);
         fps = _start.fps;
+        gm = _start.gm;
          // start the game
         refresh_game();
         
@@ -60,7 +62,7 @@
         // snakeVSblock - detect input respect to the menu options, and update data and refresh screen
         while (1) {
             
-            game.read_input(pad);
+            game.read_input(pad, device, gm);
             int back = game.update(pad, sd);
             refresh_game();