Faizan and Pages fun little game

Dependencies:   4DGL-uLCD-SE mbed SDFileSystem wave_player

Revision:
8:b2df3588d8e0
Parent:
5:d832d2d67411
Child:
9:f2ee3ef97af1
--- a/main.cpp	Mon Oct 31 03:19:14 2016 +0000
+++ b/main.cpp	Mon Oct 31 04:26:48 2016 +0000
@@ -15,14 +15,20 @@
 #define BADCHEESE 6
 #define BADTOMATO 7
 
+#define MAROON 0x8b0000
+#define DARKBROWN 0x654321
+#define YELLOW 0xffff00
+#define PURPLE 0x551a8b
+#define BROWN 0xf4a460
+
 uLCD_4DGL lcd(p9,p10,p11);
 vector<Food> foods;
 Food * collided;
 
 using namespace std;
 Stack sandwich(64,&lcd);
-DigitalIn right(p19);
-DigitalIn left(p20);
+DigitalIn right(p21);
+DigitalIn left(p22);
 int score, lives;
 float clk, clk2;
 Timer t;
@@ -50,6 +56,8 @@
     lcd.filled_circle(118, 90, 3, YELLOW);
     lcd.filled_circle(118, 100, 3, YELLOW);
     
+    updateScore(0);
+    
     while(lives) {
         if (!left) {
             sandwich.move(-1);
@@ -77,7 +85,7 @@
         if (curr - clk >= 3.0) {
             clk = curr;
             // lcd.printf(" new ");
-            int x = rand()%110+1;
+            int x = rand()%90+1;
             int type = rand()%7+1;
             Food item(type, x, &lcd);
             foods.push_back(item);