Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
83:329da564799a
Parent:
81:4c1641e10dcd
Child:
95:b068b0735f45
--- a/GameObjects/SnakeFood/SnakeFood.cpp	Mon May 06 10:49:50 2019 +0000
+++ b/GameObjects/SnakeFood/SnakeFood.cpp	Mon May 06 14:28:35 2019 +0000
@@ -17,13 +17,16 @@
     {0,1,0},
 };
 
-void SnakeFood::init() //Delete Int
+void SnakeFood::init(N5110 *lcd) //Delete Int
 {
+    _lcd = lcd;
     reset = 0;
+    _fx = NULL;
+    _fy = NULL;
 }
 
 
-void SnakeFood::draw(N5110 &lcd)
+void SnakeFood::draw()
 {
     velocity.x = 0;
     velocity.y = 1;
@@ -36,7 +39,7 @@
         reset = reset+1;
     }
 
-    lcd.drawSprite(_fx,_fy,3,3,(int *)food_sprite); //Function to draw the food.
+    _lcd->drawSprite(_fx,_fy,3,3,(int *)food_sprite); //Function to draw the food.
 }