Haoyan Zhang / Mbed 2 deprecated demmo

Dependencies:   mbed

Revision:
5:32dbfaf578dd
Parent:
4:9fa0c5edd1a1
Child:
6:b59bc5e15cf3
--- a/mian.cpp	Tue May 12 15:54:51 2020 +0000
+++ b/mian.cpp	Thu May 14 05:21:50 2020 +0000
@@ -65,13 +65,13 @@
          Starcraft.update(pad);
          render();
          wait(1.0f/fps);
-         if (Starcraft.find_score() == 20) {
+         if (Starcraft.find_score() == 15) {
              break;
          }     
     }     
     
     score();
-    if (Starcraft.find_score() == 20) {
+    if (Starcraft.find_score() == 15) {   // judge victory or fault
       victory();
       wait(1);
       goto S1;
@@ -91,7 +91,7 @@
      lcd.init();
      pad.init();
      
-     // initialise the game with correct ball and paddle sizes
+     // initialise the game with correct battleship, laser, boss and acid's sizes
      Starcraft.init(BATTLESHIP_HEIGHT, BATTLESHIP_WIDTH, LASER_HEIGHT, LASER_WIDTH,SWARM_HEIGHT, SWARM_WIDTH, BOSS_HEIGHT, BOSS_WIDTH, ACID_HEIGHT, ACID_WIDTH, SWARM_SPEED);
 }