ELEC2645 (2018/19) / Mbed 2 deprecated ll16o2l_ELEC2645

Dependencies:   mbed Gamepad

Revision:
2:888634fff8ff
Child:
3:aa82968b7a8e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DodgeEngine/DodgeEngine.h	Sat Apr 06 12:08:39 2019 +0000
@@ -0,0 +1,51 @@
+#ifndef DODGENGINE_H
+#define DODGEENGINE_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "Objects.h"
+#include "Player.h"
+#include "Stopwatch.h"
+
+
+class DodgeEngine
+{
+
+public:
+    DodgeEngine();
+    ~DodgeEngine();
+
+    void init(int player_width,int player_height,int objetcs_size,int speed);
+    void read_input(Gamepad &pad);
+    void update(Gamepad &pad);
+    void draw(N5110 &lcd);
+    int get_lose();
+    
+private:
+
+    void check_wall_collision(Gamepad &pad);
+    void check_player_collisions(Gamepad &pad);
+    void print_scores(N5110 &lcd);
+    
+//   Paddle _p1;   ////CHANGE TO OBJETCS
+//   Paddle _p2;
+
+    Player _player;
+    Stopwatch _stopwatch;
+     
+    int _player_width;
+    int _player_height;
+    int _objects_size;
+    int _speed;
+    int lose;
+    int player_score;
+    
+    Objects _objects;
+    
+    Direction _d;
+    float _mag;
+
+};
+
+#endif
\ No newline at end of file