ELEC2645 (2018/19) / Mbed 2 deprecated fy14lkaa

Dependencies:   mbed

Revision:
5:476696df08dd
Child:
6:38d76d2da485
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SpaceInvadersEngine/SpaceInvadersEngine.h	Sun Apr 14 14:29:05 2019 +0000
@@ -0,0 +1,57 @@
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+
+
+
+// gap from edge of screen
+#define GAP 2
+
+
+class PongEngine
+{
+
+public:
+   SpaceInvadersEngine();
+    ~SpaceInvadersEngine();
+
+    void init(int space_ship_width,int space_ship_height,int bullet_size, int alien_size, int speed);
+    void read_input(Gamepad &pad);
+    void update(Gamepad &pad);
+    void draw(N5110 &lcd);
+    
+    
+    
+    private:
+
+    void check_wall_collision(Gamepad &pad);
+    void space_ship_collisions(Gamepad &pad);
+    void check_goal(Gamepad &pad);
+    void print_scores(N5110 &lcd);
+    
+    //Paddle _p1;
+    //Paddle _p2;
+     
+    int _ space_ship_width;
+    int _ space_ship_height;
+    int _bullet_size;
+    int _alien_size;
+    int _speed;
+    
+    
+    
+    /*   // x positions of the paddles
+    int _p1x;
+    int _p2x;
+    
+    Ball _ball;
+    
+    Direction _d;
+    float _mag;
+    */
+
+};
+
+#endif
+    
\ No newline at end of file