Owen Cavender 201159294

Dependencies:   mbed Gamepad2

Revision:
5:d716013c6a18
Parent:
2:44e4a6ecdbef
Child:
6:bf90044188d0
--- a/snake.h	Tue May 26 18:42:16 2020 +0000
+++ b/snake.h	Wed May 27 10:27:34 2020 +0000
@@ -24,16 +24,16 @@
         null
     };
 
-    void init();
+    void init(GameEngine &engine);
     int set_direction(Gamepad &pad);
     //Directions get_direction();
-    void move_and_draw_snake(Gamepad &pad, N5110 &lcd);
+    void move_snakebody(GameEngine &engine, N5110 &lcd);
     void gameover_true(N5110 &lcd);
-    void check_if_scored(N5110 &lcd, Gamepad &pad);
+    void check_scored(N5110 &lcd, Gamepad &pad, GameEngine &engine);
     void check_wall_collisions();
     //  void render(N5110 &lcd);
     void clear_applepos(N5110 &lcd);
-
+  //  void draw_snake(Vector2D &_snakebody, N5110 &lcd);
 
 
 
@@ -43,8 +43,10 @@
     Directions _direction;
     int _length;
     int _score;
-    GameEngine _engine;
-
+    Vector2D *_snakebody;
+    Vector2D S0;
+    Vector2D S1;
+    
 
 };