ELEC2645 (2018/19) / Mbed 2 deprecated el17cr

Dependencies:   mbed

Revision:
5:1a9d84df7207
Parent:
4:03d13a53308c
Child:
6:85314a3d69cd
--- a/Falldown/Falldown.h	Mon Apr 22 16:14:49 2019 +0000
+++ b/Falldown/Falldown.h	Sat May 04 10:49:53 2019 +0000
@@ -6,6 +6,7 @@
 #include "Gamepad.h"
 #include "Ball.h"
 #include "Ground.h"
+#include "Line.h"
 
 #define GAP 2
 
@@ -16,40 +17,49 @@
     Falldown();
     ~Falldown();
 
-    void init(int ground_height,int ball_size);
+    void init(int ground_height, int ball_size,int line_height,int line_width);
     void read_input(Gamepad &pad);
     void update(Gamepad &pad);
     void draw(N5110 &lcd);
+    int check_goal();
+    
+    
     
 private:
 
     void check_wall_collision(Gamepad &pad);
     void check_Ground_collisions(Gamepad &pad);
-    void check_goal(N5110 &lcd);
+    
     //void print_scores(N5110 &lcd);
     
-    Ground _ground1;
-    Ground _ground2;
+    Ground _ground;
+    //Ground _ground2;
     Ball _ball;
+    Line _line;
+    
     
     
-     
-    int _ground_width1;
+    int _line_width;
+    int _line_height;
+    
+    
+    int _ground_width;
     int _ground_height;
-    int _ground_width2;
+    //int _ground_width2;
     
     int _ball_size;
     
     
     // x positions of the Grounds
     
-    int _g1x;
-    int _g2x;
-    int _g1y;
-    int _g2y;
+    //int _g1x;
+    //int _g2x;
+    int _groundy;
+    //int _g2y;
     
     
     int _bally;
+    int _liney;
     
     Direction _d;
     float _mag;