ELEC2645 (2018/19) / Mbed 2 deprecated el17ebs

Dependencies:   mbed FATFileSystem

Revision:
5:0b31909caf7f
Parent:
4:035448357749
Child:
8:d410856c6d04
--- a/Ball/Ball.h	Mon Apr 08 15:10:28 2019 +0000
+++ b/Ball/Ball.h	Wed Apr 17 10:27:09 2019 +0000
@@ -5,14 +5,14 @@
 #include "N5110.h"
 #include "Gamepad.h"
 
-
 /** Ball Class
 * @brief Class for controlling the golf ball
 * @author Ellis Blackford Stroud
 * @date May, 2018
 */
 
-class Ball {
+class Ball 
+{
 
 public:
 
@@ -24,39 +24,38 @@
     
     void init(float x_pos, float y_pos);
     
-    void draw_ball(N5110 &lcd);
+    void drawBall(N5110 &lcd);
     
-    void draw_aim(N5110 &lcd, Gamepad &pad);
+    void printShotCount(N5110 &lcd);
     
-    void draw_course(N5110 &lcd);
-    
-    void draw_screen(N5110 &lcd, Gamepad &pad);
-    
-    void move_ball(int frame_rate, N5110 &lcd);
+    void drawPower(N5110 &lcd, Gamepad &pad);
+                    
+    void move_ball(int frame_rate);
     
     Vector2D get_ball_pos();
     
     void shoot_ball(Gamepad &pad);
     
     int get_shot_count();
-    
-    void print_shot_count(N5110 &lcd);
-    
+        
     void set_vel(float x_vel, float y_vel);
-    
-    void check_bounce(N5110 &lcd);
 
     void read_joy(Gamepad &pad);
     
+    void check_wall_bounce();
+    
+    
 private:
 
     
     Vector2D _joystick;
+    float _mag;
     float _x_pos; 
     float _y_pos;
     float _x_vel;
     float _y_vel;
     int _shot_count;
+    Direction _direction;
 };  
 
 #endif
\ No newline at end of file