Joe Shotton / Mbed 2 deprecated ELEC2645_Project_ll16j23s

Dependencies:   mbed ll16j23s_test_docs

Revision:
4:ea3fa51c4386
Parent:
3:fcd6d70e9694
Child:
5:06fa7674622a
--- a/SnakeEngine/SnakeEngine.h	Wed May 20 21:25:40 2020 +0000
+++ b/SnakeEngine/SnakeEngine.h	Sat May 23 15:31:30 2020 +0000
@@ -1,5 +1,5 @@
-#ifndef PONGENGINE_H
-#define PONGENGINE_H
+#ifndef SNAKEENGINE_H
+#define SNAKEENGINE_H
 
 #include "mbed.h"
 #include "N5110.h"
@@ -15,8 +15,10 @@
 public:
     SnakeEngine();
     ~SnakeEngine();
-
-    void read_input(Gamepad &pad);
+    
+    void init();
+    void move_body(Gamepad &pad, N5110 &lcd, bool &death);
+    int score;
     
     //void init(VARIABLES);
     //void update(Gamepad &pad);
@@ -24,9 +26,13 @@
     
 private:
 
-    Food _x;
-    Food _y;
-
+    SnakeBody _body;
+    Food _food;
+    
+    void snake_food_collision(Gamepad &pad, int &_length);
+        
+    float _angle;    
+    
     /*
     void check_wall_collision(Gamepad &pad);
     void check_paddle_collisions(Gamepad &pad);