wu weilong / Mbed 2 deprecated el18w2w

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
wuweilong
Date:
Wed May 08 21:37:13 2019 +0000
Parent:
12:80e737144104
Commit message:
3

Changed in this revision

element/element.h Show annotated file Show diff for this revision Revisions of this file
--- a/element/element.h	Wed May 08 21:03:33 2019 +0000
+++ b/element/element.h	Wed May 08 21:37:13 2019 +0000
@@ -27,13 +27,30 @@
   */
   
     void init(int foodsize,int foodx,int foody,int snakex,int snakey,int n);
+    /** get the position of food
+    *@return position of food 
+    */
     Vector2D getfoodpos();
+    /** get the position of the n th segment of snake
+    *@return position of the n th segment of snake 
+    */
     Vector2D getsnakepos(int n);
+    /** draw the graph 
+    *@param the N5110 lcd
+    *@param the value of length of snake
+    */
     void draw(N5110 &lcd,int n);
+    /** upadate the coordinates of food as a random value in a specific range
+    */
     void update();
+    /** input the control 
+    *@param the Gamepad
+    */
     void input(Gamepad &pad);
+    /**  move the snake 
+    *@param the length of snake 
+    */
     void move(int n);
-    void initdirection();