Initial Flappy mbed Game

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

Revision:
3:642d90f34496
Parent:
2:22aa1c22ec77
--- a/main.cpp	Mon Mar 24 15:04:47 2014 +0000
+++ b/main.cpp	Mon Mar 24 19:23:12 2014 +0000
@@ -115,6 +115,7 @@
     uLCD.printf("%04d", score);
     
     int go = 1;
+    int scoreWrite = 1;
     while(go) {
         
         switch (state) {
@@ -174,6 +175,14 @@
         
             wall1y2 = rand() % (73) + 8;
             wall2y1 = wall1y2 + 48;
+            scoreWrite = 1;
+        }
+        
+        if(wall1x2 < 95 && scoreWrite == 1)
+        {
+            uLCD.locate(14,0);
+            uLCD.printf("%04d", score);
+            scoreWrite = 0;
         }