Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Bat/Bat.cpp
- Revision:
- 18:a260ce8db9e7
- Parent:
- 15:81a3aaf52647
- Child:
- 19:e1ded5acb64a
--- a/Bat/Bat.cpp Wed Apr 24 21:17:22 2019 +0000
+++ b/Bat/Bat.cpp Sat Apr 27 15:42:36 2019 +0000
@@ -73,10 +73,10 @@
menu_lcd.drawCircle(72,11,5,FILL_TRANSPARENT);
menu_lcd.printString("RULES",2,3);
menu_lcd.printString("B",70,3);
- menu_lcd.drawCircle(72,27,5,FILL_TRANSPARENT);
+ menu_lcd.drawCircle(72,27,5,FILL_TRANSPARENT);
menu_lcd.printString("CONTROLS",2,5);
menu_lcd.printString("Y",70,5);
- menu_lcd.drawCircle(72,42,5,FILL_TRANSPARENT);
+ menu_lcd.drawCircle(72,42,5,FILL_TRANSPARENT);
menu_lcd.refresh();
@@ -88,3 +88,29 @@
//menu_lcd.printString(buffer,3,1);
}
+void Bat::game_over_menu(N5110 &menu_lcd,int option){
+ if (option==1){
+ menu_lcd.clear();
+ menu_lcd.printString("GAME LOST",2,1);
+ menu_lcd.printString("NO MORE BALLS LEFT",2,3);
+ menu_lcd.refresh();
+ wait(5);
+ }
+}
+void Bat::victory_menu(N5110 &menu_lcd){
+ menu_lcd.clear();
+ menu_lcd.printString("CONGRATS!!",2,1);
+ menu_lcd.printString("YOU HAVE WON",2,3);
+ menu_lcd.refresh();
+ wait(5);
+}
+void Bat::info_screen(N5110 &menu_lcd, int target){
+ menu_lcd.clear();
+ menu_lcd.printString("YOU GET 10 BALLS",0,0);
+ char buffer[5];
+ int length=sprintf(buffer,"SCORE %i RUNS",target);
+ menu_lcd.printString(buffer,0,1);
+ menu_lcd.printString("GOOD LUCK!!!",0,4);
+ menu_lcd.refresh();
+}
+