ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el17sdl_v2

Dependencies:   mbed

Revision:
13:4fa0d5148216
Parent:
12:cb3a81adf48b
--- a/SnakeHead/SnakeHead.h	Sun May 24 14:19:21 2020 +0000
+++ b/SnakeHead/SnakeHead.h	Sun May 24 15:08:31 2020 +0000
@@ -21,7 +21,7 @@
     /** Destructor */
     ~SnakeHead();
     /** Initialise snake head position, speed an direction 
-    *@param Snake  Head size
+    *@param Snake Head size
     *@param Snake Head speed
     */
     void init(int size, int speed);
@@ -30,12 +30,24 @@
     /** Updates head position */
     void update();
     /** Changes the direction in whihc the head moves
-    @param Direction d (N,E,S,W)
+    @param Direction of the joystick (N,E,S,W)
     */
     void change_direction(Direction d);
+    /** Sets the velocity of the head
+    @param 2D vector for x and y speeds
+    */
     void set_velocity(Vector2D v);
+    /** gets the current head velocity
+    @returns velocity
+    */
     Vector2D get_velocity();
+    /** Gets the current position of the head
+    @returns position
+    */
     Vector2D get_pos();
+    /** Sets the position of the head
+    @param 2D vector of x and y coordinates
+    */
     void set_pos(Vector2D p);