test avoid bulled game

Dependencies:   C12832_lcd LCD_fonts mbed mbed-rtos

Revision:
36:b88fa8ff0be9
Parent:
33:442498e281b1
Child:
38:63b99151e218
diff -r b767ad058a8b -r b88fa8ff0be9 main.cpp
--- a/main.cpp	Mon Dec 12 12:00:44 2016 +0000
+++ b/main.cpp	Mon Dec 12 12:47:07 2016 +0000
@@ -38,10 +38,10 @@
 
 void make_wall(){
     wall_height = stage.getStage();
-    for(int i = 0; i < LCD_Y; i++){
-        for(int j = 0; j < LCD_X ; j++){
-            if(wall_height[i] > (LCD_Y - 1 - j)){
-                white_board[i][j] = white_board[i][j] ^ 1;
+    for(int i = 0; i < LCD_X; i++){
+        for(int j = LCD_Y - 1; j >= 0; j--){
+            if(LCD_Y - 1 - wall_height[i] <= j){
+                white_board[j][i] = white_board[j][i] = 1;
             }
         }
     }
@@ -103,7 +103,7 @@
     lcd.setmode(XOR);
     int gameOver = 0;
     srand((int)(aIn * 100));
-    Converter converter();
+    Converter converter;
 //    Bitmap picture;
     
     while(true){
@@ -115,7 +115,7 @@
             p_bullet = b->update();
         }
         //printf("bullet  x: %d,  y: %d \n", p_bullet.x,p_bullet.y);
-//        printf("person  x: %d,  y: %d \n", p_person.x,p_person.y);
+        //printf("person  x: %d,  y: %d \n", p_person.x,p_person.y);
         corrision_judge(p_person, p_bullet);
         Bitmap picture = converter.convert(white_board);
         update_mtx.unlock();