ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18s2a_2

Dependencies:   mbed

Revision:
10:3e37b58e8600
Parent:
9:25597bc0cecc
Child:
11:ba20e1b516a1
--- a/SnakeEngine/SnakeEngine.h	Fri Jun 05 10:51:30 2020 +0000
+++ b/SnakeEngine/SnakeEngine.h	Fri Jun 05 18:45:05 2020 +0000
@@ -20,28 +20,26 @@
     ~SnakeEngine();
 
     void init(int apple_size, int snake_speed, int snake_score);
-    void read_input(Gamepad &pad); 
-    void update(Gamepad &pad);
-    void draw(N5110 &lcd);
+    void read_input(Gamepad &pad);  //Allows us to read the input from the thumbstick
+    void update(Gamepad &pad);      //Allows us to update the gamepad 
+    void draw(N5110 &lcd);          //Allows us to draw on the screen
     
 private:
 
     void print_score(N5110 &lcd);
     
-    int sx;
-    int sy;
-    int ax;
-    int ay;
-    int _snake_h;
-    int _snake_w;
-    int _apple_size;
-    int _snake_speed;
-    int _snake_score;
+    int sx;  //Snake X
+    int sy;  //Snake Y
+    int ax;  //Apple X
+    int ay;  //Apple Y
+    int _apple_size;  //Apple size is defined and taken from main.cpp
+    int _snake_speed; //Stores the speed the snake goes
+    int _snake_score; //Stores the score
     
-    Snake _s;
-    Apple _a;  
-    Direction _d;
-    float _mag;
+    Snake _s;   //Allows us to use the Snake 
+    Apple _a;   //Allows us to use the Apple 
+    Direction _d; //Direction
+    float _mag;   //Magnitude
 
 };