Laila Al Badwawi 200906179 SpaceInvaders I declare this my own independent work and understand the university rules on plagiarism.

Dependencies:   mbed

Revision:
133:eed60548d170
Parent:
132:3021192deea0
Child:
135:cf08bb4bdee9
--- a/Spaceship/Spaceship.cpp	Mon May 06 14:35:54 2019 +0000
+++ b/Spaceship/Spaceship.cpp	Wed May 08 18:54:03 2019 +0000
@@ -7,8 +7,6 @@
 {
 }
 
-
-
 void Spaceship::init(int x_spaceship,int y_spaceship, int speed_spaceship)
 {
    
@@ -19,8 +17,8 @@
 
 void Spaceship::draw(N5110 &lcd)
 {
-    lcd.drawRect(_x_spaceship,_y_spaceship,_x_spaceship+5,_y_spaceship+10,FILL_BLACK);
-    //lcd.drawSprite(_x_spaceship,_y_spaceship,10,12,(int *) spaceship_2);
+    //lcd.drawRect(_x_spaceship,_y_spaceship,_x_spaceship+5,_y_spaceship+10,FILL_BLACK);
+    lcd.drawSprite(_x_spaceship,_y_spaceship,32,32,(int *) spaceship2);
     
 }
 
@@ -35,7 +33,9 @@
             }
         else
         if(d==S){
+               //  printf("North\n");
             _y_spaceship+=2;
+            
             }
         
         if(_y_spaceship>=30){
@@ -48,11 +48,11 @@
     
 }
 
-int  Spaceship::get_pos_x()
+int Spaceship::get_pos_x()
 {
     return _x_spaceship;
 }
-int  Spaceship::get_pos_y()
+int Spaceship::get_pos_y()
 {
     return _y_spaceship;
 }
@@ -63,11 +63,12 @@
     _y_spaceship = y;
 }
 
-void  Spaceship::add_score()
-
+void Spaceship::add_score()
 {
     _score++;
 }
-int  Spaceship::get_score()
+
+int Spaceship::get_score()
 {
-    return _score;
\ No newline at end of file
+    return _score;
+}
\ No newline at end of file