Haoyan Zhang
/
el17h2z1
deemo1
Diff: mian.cpp
- Revision:
- 3:1db91ad3ab84
- Parent:
- 2:03cd3bb32511
- Child:
- 4:9fa0c5edd1a1
--- a/mian.cpp Tue May 12 08:01:52 2020 +0000 +++ b/mian.cpp Tue May 12 15:13:22 2020 +0000 @@ -21,6 +21,8 @@ #define SWARM_HEIGHT 6 #define SWARM_WIDTH 6 #define SWARM_SPEED 1 +#define BOSS_HEIGHT 4 +#define BOSS_WIDTH 6 @@ -88,7 +90,7 @@ pad.init(); // initialise the game with correct ball and paddle sizes - Starcraft.init(BATTLESHIP_HEIGHT, BATTLESHIP_WIDTH, LASER_HEIGHT, LASER_WIDTH,SWARM_HEIGHT, SWARM_WIDTH, SWARM_SPEED); + Starcraft.init(BATTLESHIP_HEIGHT, BATTLESHIP_WIDTH, LASER_HEIGHT, LASER_WIDTH,SWARM_HEIGHT, SWARM_WIDTH, BOSS_HEIGHT, BOSS_WIDTH, SWARM_SPEED); } // this function draws each frame on the LCD @@ -174,13 +176,15 @@ void victory() { lcd.clear(); - lcd.printString(" Victory! ",2,2); + lcd.printString(" Victory! ",1,1); + lcd.printString(" You protect ",1,2); + lcd.printString(" the earth! ",1,3); lcd.refresh(); wait(2); lcd.clear(); - lcd.printString(" Press back ",1,3); - lcd.printString(" to play again ",1,4); + lcd.printString(" Press back ",1,1); + lcd.printString(" to play again ",1,3); lcd.refresh(); while ( pad.check_event(Gamepad::START_PRESSED) == false && pad.check_event(Gamepad::BACK_PRESSED) == false) {