ELEC2645 (2018/19) / Mbed 2 deprecated el17zl

Dependencies:   mbed

Fork of el17zl by Zhenwen Liao

Revision:
2:9f0d9516a6cd
Child:
4:750d3f9b54de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PushingEngine/PushingEngine.h	Sun Mar 24 10:45:30 2019 +0000
@@ -0,0 +1,59 @@
+#ifndef PUSHINGENGINE_H
+#define PUSHINGENGINE_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "Ppl.h"
+#include "Box.h"
+
+
+
+class PushingEngine
+{
+
+public:
+    PushingEngine();
+    ~PushingEngine();
+
+    void init(int box1_x,int box1_y,int box2_x,int box2_y,int ppl_x,int ppl_y,int cross1_x,int corss2_x,int cross1_x,int cross2_y);
+    void read_input(Gamepad &pad);
+    void update(Gamepad &pad);
+    void draw(N5110 &lcd);
+
+private:
+
+    //void check_wall_collision(Gamepad &pad);
+    //void check_paddle_collisions(Gamepad &pad);
+    void check_goal(Gamepad &pad);
+    void print_scores(N5110 &lcd);
+
+    Box _b1;
+    Box _b2;
+
+    // positions of the Boxes
+    int _b1x;
+    int _b2x;
+    int _b1y;
+    int _b2y;
+
+    Ppl _ppl;
+
+    // poitions of the ppl
+    int _pplx;
+    int _pply;
+
+    Cross _c1;
+    Cross _c2;
+
+    int _c1x;
+    int _c2x;
+    int _c1y;
+    int _c2y;
+
+    Direction _d;
+    float _mag;
+
+};
+
+#endif
\ No newline at end of file