Owen Cavender 201159294

Dependencies:   mbed Gamepad2

Revision:
6:bf90044188d0
Parent:
5:d716013c6a18
Child:
8:997f90c88246
diff -r d716013c6a18 -r bf90044188d0 snake.h
--- a/snake.h	Wed May 27 10:27:34 2020 +0000
+++ b/snake.h	Thu May 28 15:02:30 2020 +0000
@@ -5,7 +5,7 @@
 #include "mbed.h"
 #include "N5110.h"
 #include "Gamepad.h"
-#include "GameEngine.h"
+#include "Apple.h"
 
 
 class Snake
@@ -24,16 +24,23 @@
         null
     };
 
-    void init(GameEngine &engine);
-    int set_direction(Gamepad &pad);
-    //Directions get_direction();
-    void move_snakebody(GameEngine &engine, N5110 &lcd);
-    void gameover_true(N5110 &lcd);
-    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);
+    void init();
+
+
+    void check_collisions();
+    void check_score(N5110 &lcd, Gamepad &pad, Apple &apple, Timer &timer);
+
+
+
+
+    void get_position(Gamepad &pad);
+    void render(N5110 &lcd, Apple &apple);
+    void get_LEDs(Gamepad &pad);
+    void get_timer(Timer &timer);
+    bool get_gameover();
+    int get_score();
+    void print_scores(N5110 &lcd);
+    void print_display_time(N5110 &lcd);
 
 
 
@@ -41,12 +48,27 @@
 
     bool _gameover;
     Directions _direction;
-    int _length;
     int _score;
-    Vector2D *_snakebody;
-    Vector2D S0;
-    Vector2D S1;
-    
+
+    float _realtime;
+    int Reset_value;
+    float _display_time;
+
+
+    int _x0;
+    int _x1;
+    int _x2;
+    int _x3;
+
+    int _y0;
+    int _y1;
+    int _y2;
+    int _y3;
+
+//Vector2D SK0;
+//Vector2D SK1;
+//Vector2D SK2;
+//Vector2D SK3;
 
 };