ZIYI CHEN ml17z4c 201214999

Dependencies:   mbed

Revision:
9:a8b2086a46e5
Parent:
8:52e0506e98b8
--- a/Food/Food.h	Mon May 06 00:06:15 2019 +0000
+++ b/Food/Food.h	Wed May 08 20:48:33 2019 +0000
@@ -2,33 +2,43 @@
 #include "N5110.h"
 #include "Gamepad.h"
 
-
 /** The Food class
-* @brief generate a position of the food for snake 
-* @author ZiYi Chen
-* @date May, 2019
+* @brief generate a position of food randomly
+* @author ZIYI CHEN
+* @date may 2019
 */
 
 class Food
 {
 public:
 
-
+    /**Constructor*/
     Food();
-    
-
+    /**Destructor*/
     ~Food();
 
+
+    /** Init function
+    * @param set the position of the food (x,y)
+    */
     void init(int x, int y);
 
-    int getX();
-    
-    int getY();
-    
+    /** Gets  x coordinate of the food
+    * @return X coordinate
+    */
+    int xcoordinate();
+
+    /** Gets  y coordinate of the food
+    * @return Y coordinate
+    */
+    int ycoordinate();
+
+    /**Generate the location of the food randomly*/
     void random();
-
-private:
-
+    /**the integer variables _x and _y*/
     int _x;
     int _y;
+
+
+
 };
\ No newline at end of file