ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18s2a_2

Dependencies:   mbed

Revision:
16:8cb23849b95a
Parent:
13:c20acb3b1adf
Child:
19:0bf3ed373218
--- a/SnakeEngine/SnakeEngine.h	Fri Jun 05 22:35:50 2020 +0000
+++ b/SnakeEngine/SnakeEngine.h	Fri Jun 05 22:44:54 2020 +0000
@@ -7,7 +7,8 @@
 #include "Apple.h"
 #include "Snake.h"
 #include "Bitmap.h"
-/** Apple Class File
+
+/** SnakeEngine Class File
 * @brief Class containing the engine that runs the game.
 * @author Simon Atkinson
 * @date June 2020
@@ -23,13 +24,32 @@
 public:
     SnakeEngine();
     ~SnakeEngine();
-
+    /**
+    @pram The Initial setup of the of the game engine.
+    */
     void init(int apple_size, int snake_speed, int snake_score, int snake_snakeheight, int snake_snakewidth);
-    void read_input(Gamepad &pad);  //Allows us to read the input from the thumbstick
-    void update(Gamepad &pad, N5110 &lcd);      //Allows us to update the gamepad 
-    void draw(N5110 &lcd);          //Allows us to draw on the screen
-    void dead(N5110 &lcd, Gamepad &pad); // The snake is DEAD :(
-    void eat(N5110 &lcd, Gamepad &pad); // Deals with the snake eating the apple
+    /**
+    @pram Allows us to read from any of the inputs in the gamepad in this case its the Thumbstick on the left hand side.
+    */
+    void read_input(Gamepad &pad);  
+    /**
+    @pram We are using this for collision dection. Currently it only detects when you crash into the wall. If a collision is detected the game is over.
+    */    
+    void crash(Gamepad &pad, N5110 &lcd); 
+    /**
+    @pram This is used to draw what you see on the LCD display
+    */
+    void draw(N5110 &lcd);         
+    /**
+    @pram The snake is DEAD :( Ends the game when the snake is dead and displays your score and instructions for restarting the game. 
+    */
+    void dead(N5110 &lcd, Gamepad &pad); // 
+    /**
+    @pram Deals with the snake eating the apple. Started but wasn't able to get to work. It should detect when you eat the apple, add to the score and spawn another apple and give a flash of the green LEDs to show that the apple has been eaten.
+    */
+    void eat(N5110 &lcd, Gamepad &pad); 
+
+
 private:
 
     void print_score(N5110 &lcd);