James Cummins / Mbed 2 deprecated el17jnc

Dependencies:   mbed

Revision:
9:ce0a12fb205b
Child:
10:40c77d69e83c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Ball/Ball.h	Wed Apr 10 12:54:56 2019 +0000
@@ -0,0 +1,36 @@
+#ifndef BALL_H
+#define BALL_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "FXOS8700CQ.h"
+
+
+class Ball {
+
+public:
+//constructor method
+    Ball();
+//destructor method
+    ~Ball();
+//methods for engine
+    void init(int radius);
+    void draw(N5110 &lcd);
+    void update(FXOS8700CQ &accelerometer);
+//accessor methods
+    Vector2D get_accel();
+    Vector2D get_velocity();
+    Vector2D get_position();
+//mutator methods
+    void set_velocity(Vector2D vel);
+    void set_position(Vector2D pos);
+    
+private:
+    _radius;
+    _x;
+    _y;
+    Vector2D _velocity;
+    Vector2D _accel;
+};
+#endif
\ No newline at end of file