ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
26:6427f09cf8d3
Parent:
24:23fd6b451db7
Child:
28:d0b0a64a832d
--- a/UserInteraction/UX.h	Wed May 01 09:08:03 2019 +0000
+++ b/UserInteraction/UX.h	Wed May 01 11:56:36 2019 +0000
@@ -5,9 +5,9 @@
 #include "N5110.h"
 #include "Gamepad.h"
 
-/** Ball Class
-@author Dr Craig A. Evans, University of Leeds
-@brief Controls the ball in the Pong game 
+/** Ball UX
+@author Shahid Zubin Sajid
+@brief Class for menus and display's user convenience 
 @date Febraury 2017
 */ 
 class UX
@@ -16,36 +16,62 @@
 public:
     UX();
     ~UX();
+    /** 
+    * @brief Initlialises the UX class
+    */
     void init();
-    void draw(N5110 &lcd);
-    void update();
+    /** 
+    * @brief checks if the Button A is pressed
+    * @returns returns an int, 1 if the button is pressed 0 if false
+    */
     int get_a_pressed();
-    int get_l_pressed();
-    void reset();
-    int get_loft_ball();
+    /** 
+    * @brief checks if the Button L is pressed
+    * @returns returns an int, 1 if the button is pressed 0 if false
+    */
+    int get_l_pressed(); 
+    /** 
+    *@brief prints the introuction screen for the game
+    *@param &menu_lcd @details reference object for a N5110 class object
+    */
     void first_menu(N5110 &menu_lcd);
+    /** 
+    *@brief prints options menu and takes user input for which option they would like to choose
+    *@param &menu_lcd @details reference object for a N5110 class object
+    */
     void second_menu(N5110 &menu_lcd);
+     /** 
+    *@brief prints options menu and takes user input for which option they would like to choose
+    *@param &menu_lcd @details reference object for a N5110 class object
+    */
     void menu_options(N5110 &menu_lcd);
+     /** 
+    *@brief prints the rules for the game across multiple displays
+    *@param &menu_lcd @details reference object for a N5110 class object
+    */
     void rules_menu(N5110 &menu_lcd);
+     /** 
+    *@brief prints the controls for the game across 3 displays
+    *@param &menu_lcd @details reference object for a N5110 class object
+    */
     void controls_menu(N5110 &menu_lcd);
-    void game_over(string message);
+     /** 
+    *@brief prints the screen for when game is over
+    *@param &menu_lcd @details reference object for a N5110 class object
+    *@param option @details option integer which denotes the manner in which the batsman was out
+    */
     void game_over_menu(N5110 &menu_lcd,int option);
+     /** 
+    *@brief prints the screen when player wins the game
+    *@param &menu_lcd @details reference object for a N5110 class object
+    */
     void victory_menu(N5110 &menu_lcd);
     void info_screen(N5110 &menu_lcd, int target);
-    /// accessors and mutators
-    
     
 private:
    
-    
     Gamepad batPad;
-    int _hitBall;
-    int _loft_ball;
-    int d;
-    Direction _d;
-    int _size;
-    int _x;
-    int _y;
+    // boolean variable used in get_a_pressed() get_l_pressed() to check if button is pressed 
     bool _button_pressed;
 };
 #endif
\ No newline at end of file