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
Fork of el17dg by
Diff: menu/menu.cpp
- Revision:
- 26:676874c42883
- Parent:
- 24:0570cb4b92d7
- Child:
- 27:f05f4e738ba9
--- a/menu/menu.cpp Wed Apr 03 12:46:04 2019 +0000
+++ b/menu/menu.cpp Sat Apr 06 20:13:33 2019 +0000
@@ -1,9 +1,11 @@
#include "main.h"
#include "menu.h"
#include "constants.h"
+#include "game.h"
const int total_options = 3;
const float time_delay = 100;
+int high_score = 0;
int cursor[84] = {
0,0,0,0,1,0,0,0,0,0,1,1,
@@ -38,6 +40,14 @@
}
drawPointer(); // Drawing pointer only ones.
+
+ if (high_score < game_score){
+ high_score = game_score;
+ }
+
+ char buffer[32];
+ sprintf(buffer,"High Score %i",high_score);
+ lcd.printString(buffer,0,0);
lcd.printString("Start Game",1,2);
lcd.printString("Tutorial",1,3);
