ELEC2645 (2018/19) / Mbed 2 deprecated el17ebs

Dependencies:   mbed FATFileSystem

Revision:
14:08ac9aaa34c3
Parent:
13:681192091568
Child:
16:c8d68cbd1ae2
diff -r 681192091568 -r 08ac9aaa34c3 GolfEngine/GolfEngine.h
--- a/GolfEngine/GolfEngine.h	Mon May 06 10:00:57 2019 +0000
+++ b/GolfEngine/GolfEngine.h	Wed May 08 14:54:19 2019 +0000
@@ -25,44 +25,60 @@
     /** Destructor */
     ~GolfEngine();
     
+    /** Sets values for new game
+    * @param the frame rate in Hz
+    */    
     void init(int frame_rate);
+       
+    /** Draws game screen
+    * @param the class used to interact with the lcd display
+    */ 
+    void drawGame(N5110 &lcd);
     
-    void new_level(N5110 &lcd, SDFileSystem &sd);
-    
-    void drawGame(N5110 &lcd, Gamepad &pad);
-    
+    /** Reads input from gamepad
+    * @param the class used to interact with the gamepad
+    */ 
     void read_input(Gamepad &pad);
     
-    void update_ball(Gamepad &pad);
-                    
-    void set_level(int level);
-
-    int get_level();
+    /** Updates ball position according to input
+    * @param the class used to interact with the gamepad
+    */ 
+    void update_ball(Gamepad &pad, N5110 &lcd);
+    
+    /** Checks if level is over 
+    * @param the class used to interact with the lcd display
+    * @param the class used to interact with the gamepad
+    * @param the class used to interact with the sd card
+    */ 
+    void check_end_level(N5110 &lcd, Gamepad &pad, SDFileSystem &sd);
     
-    void printLevel(N5110 &lcd);
+    /** Prints current level
+    * @param the class used to interact with the lcd display
+    */ 
+    void printLevel(N5110 &lcd);    
     
-    void reset_hole_flag(); 
+    /** Resets game over flag */
+    void reset_game_over_flag();
     
-    bool get_hole_flag();
+    /** Returns game over flag
+    * @param true if game over and false if now
+    */     
+    bool get_game_over_flag();
     
 private:
 
     void drawCourseWalls(N5110 &lcd, WallMap map[], int size);
-    
     void drawHole(N5110 &lcd, Coord hole);
-    
     void file_append(int value, SDFileSystem &sd);
-    
+    void new_level(N5110 &lcd, SDFileSystem &sd);
+    void c_maj(Gamepad &pad);
+    void g_maj7_flash(Gamepad &pad, N5110 &lcd);
+
     int _level;
-    
-    bool _hole_flag;
-    
+    bool _game_over_flag;
     float _mag;
-    
     Vector2D _joy_coord;
-    
     float _angle;
-
     Ball _ball;
     
 };