player 1

Dependencies:   4DGL-uLCD-SE PinDetect SparkfunAnalogJoystick mbed-rtos mbed SDFileSystem

Fork of 4180FinalLab by Rishi Bhargava

Wireless 2 Player Pong game

Revision:
4:7da18e3c590b
Parent:
3:591086e44bf9
Child:
8:8cc2aa78348c
--- a/ball.h	Sun Apr 24 01:23:28 2016 +0000
+++ b/ball.h	Tue Apr 26 18:24:46 2016 +0000
@@ -5,9 +5,9 @@
 public:    
     Ball (uint8_t, uint8_t, uint8_t);
     // Set Functions
-    void setVx(uint8_t); // This sets the velocity
+    void setVx(double); // This sets the velocity
     void setVxDir(bool);
-    void setBaseVy(uint8_t); // This sets the velocity
+    void setVy(double); // This sets the velocity
     void setVyDir(bool);
     // Get Functions
     uint8_t getSize();
@@ -22,11 +22,11 @@
     void update(); // moves the ball on the screen one vx and vy
     
 private:
-    uint8_t vx;
+    double vx;
     bool vxDir; //false is left (-x), true is right (+x)
-    uint8_t vy;
+    double vy;
     bool vyDir; //false is up (-y), true is down (+y)
-    uint8_t x;
-    uint8_t y;
+    double x;
+    double y;
     uint8_t diameter;
 };