ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

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);