ELEC2645 (2017/18) / Mbed 2 deprecated el16a2t

Dependencies:   mbed

Revision:
3:124a5eb55c77
Parent:
2:a48df109588e
Child:
4:a6ca44e29e97
--- a/engine/main.cpp	Mon Apr 30 23:29:45 2018 +0000
+++ b/engine/main.cpp	Tue May 01 09:06:51 2018 +0000
@@ -37,7 +37,7 @@
 
 // initialise the lcd and gamepad
     lcd.init();
-    lcd.setContrast(0.5);
+    lcd.setContrast(0.4);
     pad.init ();
 }
 
@@ -64,8 +64,7 @@
     const int arrayNum[3] = {'4', '24', '44'};
     int RandIndex = rand() % 3;
 
-//    x_car = arrayNum[RandIndex];
-    x_car = 24;
+    x_car = arrayNum[RandIndex];
     y_car = 0;
 
 //set score
@@ -89,6 +88,7 @@
 
             x_player = x_player-20;
         }
+//car cannot go further left than the left lane etc
         if (x_player <4) {
             x_player = 4;
         }