Final Submission. I have read and agreed with Statement of Academic Integrity.

Dependencies:   mbed Gamepad N5110 Joystick

Revision:
10:aedca0082855
Parent:
4:0fc3441556e1
--- a/Snake/Snake.h	Thu May 09 11:36:21 2019 +0000
+++ b/Snake/Snake.h	Thu May 09 13:52:41 2019 +0000
@@ -5,25 +5,57 @@
 #include "N5110.h"
 #include "Gamepad.h"
 
+/** Snake Class
+ * @brief The class for drawing snake and determining snake position for snake game
+ * @author Daniel Crockford 201039580
+ * @date 09 May 2019
+ */
 class Snake {
     
 public:
-    // constructor
+    /** Constructor */
     Snake();
     
-    // destructor
+    /** Deconstructor */
     ~Snake();
 
+    /** initialise snake */
     void init();
+    
+    /** draw the snake head
+    * @param N5110 class for controlling the lcd screen */
     void draw_head(N5110 &lcd);
-    void set_snake_posX(int snake_posX); // mutators
+    
+    /** allows snake horizontal position to be set from outside
+    * @param value between 0 and 80 */
+    void set_snake_posX(int snake_posX);
+    
+    /** allows snake vertical position to be set from outside
+    * @param value between 0 and 44 */
     void set_snake_posY(int snake_posY);
-    int get_snake_posX(); //accessors
+    
+    /** get snake horizontal position */
+    int get_snake_posX();
+    
+    /** get snake vertical position*/
     int get_snake_posY();
+    
+    /** draw food
+    * @param N5110 class for controlling the lcd screen*/ 
     void draw_food(N5110 &lcd);
-    void set_food_posX(int food_posX); // mutators
+    
+    /** allows food horizontal position to be set from outside
+    * @param value between 4 and 80 */
+    void set_food_posX(int food_posX);
+    
+    /** allows food vertical position to be set from outside
+    * @param value between 4 and 40 */
     void set_food_posY(int food_posY);
-    int get_food_posX(); //accessors
+    
+    /** get snake food horizontal position */
+    int get_food_posX();
+    
+    /** get food vertical position */ 
     int get_food_posY();
 
 private: