Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
54:20abd16c7d74
Parent:
53:527cf297b088
Child:
59:c65a2e933c47
--- a/GameObjects/Blocks/Blocks.cpp	Fri Apr 26 19:09:39 2019 +0000
+++ b/GameObjects/Blocks/Blocks.cpp	Fri Apr 26 19:32:57 2019 +0000
@@ -288,7 +288,7 @@
     if(k == 0){
         _bx = 0;
         _by = -11;
-        i=0; //this variable is used to save the positions of the random numbers generated in a block
+        int i=0; //this variable is used to save the positions of the random numbers generated in a block
         while(i < 5)  {
             caseselect[i] = rand()%16; //can make it 17 here later so that people are in for a shock when they think its an empty space and loose massive lives???
             i++;
@@ -310,8 +310,8 @@
 }
 
 void Blocks::ChooseBlocks(N5110 &lcd)  {
-    i = 0;
-    pos = 4; //this refers to the x coordinate of the blocks.
+    int i = 0;
+    int pos = 4; //this refers to the x coordinate of the blocks.
     while((i<5)&&(pos<=68))  {
         state = caseselect[i];
         switch(state)  {