ELEC2645 (2017/18) / Mbed 2 deprecated el17yw

Dependencies:   mbed

Revision:
7:1964f649676e
Parent:
6:46d0caedf217
Child:
8:4a5e96ed2347
--- a/boom/boom.cpp	Tue Apr 17 20:53:43 2018 +0000
+++ b/boom/boom.cpp	Tue Apr 17 23:03:03 2018 +0000
@@ -15,23 +15,23 @@
 {
     boom_x = x;
     boom_y = y;
-    //boom_speed = 5;  // default speed
    
 
 }
 
 void boom::draw(N5110 &lcd)
 {
+     //draw the boom on the screen
      lcd.drawCircle(boom_x,boom_y,2,FILL_TRANSPARENT);
   
 }
 
 void boom::update()
 {
+    //set the falling speed of boom
+    //let the boom move with set speed
     boom_speed = 3;
     boom_y+= boom_speed; 
-
-    // check the y origin to ensure that the paddle doesn't go off screen
    
 }
 Vector2D boom::get_pos()
@@ -39,10 +39,10 @@
     Vector2D p = {boom_x,boom_y};
     return p;
 }
-void boom::set_pos(Vector2D p)
+void boom::set_pos(Vector2D p1)
 {
-    boom_x = p.x;
-    boom_y = p.y;
+    boom_x = p1.x;
+    boom_y = p1.y;
 }