Simple fish eat program

Dependencies:   mbed mbed-rtos N5110 ShiftReg Tone

Revision:
12:20ac766b3175
Parent:
11:7c1e2a9303d3
Child:
14:f1552b691274
--- a/classes/HighScore.cpp	Wed Apr 21 11:08:02 2021 +0000
+++ b/classes/HighScore.cpp	Wed Apr 21 15:24:31 2021 +0000
@@ -3,19 +3,20 @@
 LocalFileSystem local("scores"); //define local file system
 
 //display value in file
-void HighScore::display_File(N5110 &lcd){
+void HighScore::displayFile(N5110 &lcd){
     FILE* Scores = fopen("/scores/textfile.txt","r"); //opens and reads file
     fgets(readScore1, 8, Scores); //read first data value and stores it in string 'readScore'
     fclose(Scores); //closes Scores    
         
     lcd.clear();
-    lcd.printString(" 1st. ", 5, 1);
-    lcd.printString(readScore1, 40, 1);
+    lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border
+    lcd.printString(" Top Score", 12, 1);
+    lcd.printString(readScore1, 30, 3);
     lcd.refresh();
 }
     
-//amend file
-void HighScore::write_File(int score){
+//write/amend file
+void HighScore::writeFile(int score){
     score1 = score;
                                 //string            int
     stringCon1 = sprintf(writeScore1, "%i", score1); //converts int into string   
@@ -25,7 +26,7 @@
 }
 
 //read from file
-int HighScore::read_File(){
+int HighScore::readFile(){
     FILE* Scores = fopen("/scores/textfile.txt","r"); //opens and reads file
     fgets(readScore1, 8, Scores); //read first data value and stores it in string 'readScore'
     fclose(Scores); //closes Scores