ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el17c2w

Dependencies:   mbed

Revision:
12:2af7b4868033
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Ball2/Ball2.h	Wed May 27 07:00:37 2020 +0000
@@ -0,0 +1,34 @@
+#ifndef BALL2_H
+#define BALL2_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "Paddle.h"
+
+/** Ball Class
+@author Dr Craig A. Evans, University of Leeds
+@brief Controls the ball in the Pong game 
+@date Febraury 2017
+*/ 
+class Ball2
+{
+    public:
+        Ball2();
+        ~Ball2();
+        void init(int size,int speed);
+        void draw(N5110 &lcd);
+        void update();
+        /// accessors and mutators
+        void set_velocity(Vector2D v);
+        Vector2D get_velocity();
+        Vector2D get_pos();
+        void set_pos(Vector2D p);
+
+    private:
+        Vector2D _velocity;
+        int _size;
+        int _x;
+        int _y;
+};
+#endif
\ No newline at end of file