Thomas Davies / Mbed 2 deprecated LetTheBallDrop

Dependencies:   N5110 mbed PowerControl

Revision:
3:00c0f63f4408
Parent:
2:d4402bc3dd45
Child:
4:f8d04c073730
diff -r d4402bc3dd45 -r 00c0f63f4408 GameScreen.cpp
--- a/GameScreen.cpp	Sat Mar 07 13:49:53 2015 +0000
+++ b/GameScreen.cpp	Sat Mar 07 13:55:08 2015 +0000
@@ -132,6 +132,9 @@
         if (allPlatforms[n]->y > (platThickness_))
             allPlatforms[n]->y = allPlatforms[n]->y - 1;
         else
+        {
             allPlatforms[n]->y =  maxY_ - platThickness_ + 1; //send back to bottom.
+            allPlatforms[n]->x = rand() % (maxX_-platGapSize_ + 1) - 1; //select a new random position of gap!
+        }
     }
 }
\ No newline at end of file