Rushendrar Birudala / Mbed 2 deprecated Math_Fun

Dependencies:   mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem

Files at this revision

API Documentation at this revision

Comitter:
rushib1
Date:
Mon Apr 27 03:38:35 2020 +0000
Parent:
3:6e41a5ce16c2
Child:
5:269d04e12a9e
Commit message:
Changed scoreboard

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Apr 27 03:14:16 2020 +0000
+++ b/main.cpp	Mon Apr 27 03:38:35 2020 +0000
@@ -569,10 +569,10 @@
     for (int i = 0; i < 3; i++)
         {
             if (new_score_arr[i]< new_game.score){
-                int j = i;
-                while(j<2){
+                int j = 1;
+                while(i<=j){
                     new_score_arr[j+1] = new_score_arr[j];
-                    j++;
+                    j--;
                 }
                 new_score_arr[i] = new_game.score;
                 pc.printf("high score found");