Zirui Chen 201235448

Dependencies:   mbed

Revision:
6:b393cfe4e0a7
Parent:
5:7207c9b70108
Child:
7:f61ac963eb07
--- a/Board/Board.cpp	Wed May 27 21:13:59 2020 +0000
+++ b/Board/Board.cpp	Thu May 28 01:11:47 2020 +0000
@@ -10,12 +10,11 @@
 {
 
 }
-
-void Board::init(int x,int y,int height,int width,N5110 &lcd)
+//borad initial function
+void Board::init(int x,int y,int height,int width)
 {
     _x=x ; // horizontal coordinate of Board
-    //_y=48-height/2 ; // vertical coordinate of fighte
-    _y=y ;
+    _y=y ;// vertical coordinate of board
     _height =height;
     _width = width;
     _speed = 1;  // default speed
@@ -33,14 +32,14 @@
         
         
     }
-        void Board::update(Direction d,float mag,N5110 &lcd)
+        void Board::update(Direction d,float mag)
         {
             _speed = int(mag*10.0f);  // scale is arbitrary, could be changed in future
            //if((ball_pos.y >= 0)&&(ball_pos.y <= 24))
           //  {
            //     lcd.drawRect(24,41,10,10,FILL_TRANSPARENT);
            // }
-            lcd.clearPixel(10,24);
+        //  lcd.clearPixel(10,24);
 
     // update y value depending on direction of movement
     // North is decrement as origin is at the top-left so decreasing moves up