SharpShooter

Dependencies:   4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player

Revision:
11:55b65415b6ba
Parent:
9:96a2e663994b
Child:
12:2f358065ba3f
diff -r 92538c02e6c8 -r 55b65415b6ba Obstacle.h
--- a/Obstacle.h	Fri Oct 28 19:02:28 2016 +0000
+++ b/Obstacle.h	Fri Oct 28 20:07:38 2016 +0000
@@ -1,23 +1,24 @@
+extern uLCD_4DGL uLCD;
+
+
 class Obstacle
 {
     int x1,x2,y1,y2;
-    uLCD_4DGL uLCD;
     bool direction;
 
 public:
-    Obstacle(int x1, int x2, int y1, int y2, uLCD_4DGL uLCD);
+    Obstacle(int x1, int x2, int y1, int y2);
     void drawObstacle();
     void move(int speed);
     void changeDirection();// need change direction when hitting wall
     void setDirection(bool direction);
 };
 
-Obstacle::Obstacle(int a, int b, int c, int d, uLCD_4DGL e) {
+Obstacle::Obstacle(int a, int b, int c, int d) {
     x1 = a;
     x2 = b;
     y1 = c;
     y2 = d;
-    this->uLCD = e;
 }
 
 void Obstacle::drawObstacle() {
@@ -36,7 +37,7 @@
 }
 
 void Obstacle::changeDirection() {
-    direction = !direction
+    direction = !direction;
 }
 
 void Obstacle::setDirection(bool a) {