za

Fork of m3pi by Chris Styles

Files at this revision

API Documentation at this revision

Comitter:
s4stevo
Date:
Fri Apr 19 10:46:16 2013 +0000
Parent:
11:d6f259026b7c
Child:
13:f55ec972be61
Commit message:
non descrete;

Changed in this revision

Resources.h Show annotated file Show diff for this revision Revisions of this file
--- a/Resources.h	Fri Apr 19 10:10:37 2013 +0000
+++ b/Resources.h	Fri Apr 19 10:46:16 2013 +0000
@@ -274,7 +274,6 @@
 
     while((i != startRow) || (j != startCol))
     {
-
         int min = maze1F[i][j];
 
         if(i > 0 && !(maze1[i][j] & TOP))
@@ -293,7 +292,7 @@
             if(maze1F[i+1][j] < min && maze1F[i+1][j] != -1)
             {
                 min = maze1F[i+1][j];
-                di = +1;
+                di = 1;
                 dj = 0;
             }
         }
@@ -315,7 +314,7 @@
             {
                 min = maze1F[i][j+1];
                 di = 0;
-                dj = +1;
+                dj = 1;
             }
         }
 
@@ -324,27 +323,11 @@
 
         counter++;
     
-
         unsigned char byteVal = cellToByte(i, j);
-        //Sleep(100);
-        //cout << "[" << i << ", " << j << "] " << counter << "  " << currentDistance << "  " << (int)byteVal << endl;
 
         directions[currentDistance - counter] = byteVal;
-        //directions[currentDistance + 1] = directions[currentDistance];
 
     }
-
-    //cout << endl;
-
-    for(int i = 0; i < currentDistance; i++)
-    {
-
-        //cout << "Step " << i << ": [" << rowFromByte(directions[i]) << ", " << colFromByte(directions[i]) << "]";
-
-        //cout <<  endl;
-    }
-
-    //cout << "done" << endl;
 }
 
 void turnRight()
@@ -372,8 +355,6 @@
         int col = colFromByte(directions[d]);
         unsigned char byte = directions[d];
         
-        //cout << "Step " << d-1 << ": [" << rowFromByte(directions[d]) << ", " << colFromByte(directions[d]) << "]  " << (prevByte - byte) << endl;
-
         switch(orientation)
         {
             case NORTH:
@@ -457,7 +438,7 @@
                         Movements[moveCounter++] = FORWARD; 
                         break;
 
-                    case -16:
+                    case -16: //DOWN
                         Movements[moveCounter++] = FORWARD;
                         break;
                 }
@@ -499,7 +480,6 @@
     }
 
     Movements[moveCounter++] = HALT;
-
 }
 
 
@@ -512,7 +492,7 @@
     {
         orientation = 0;
         startRow = 15;
-        startCol = 15;
+        startCol = 0;
     }
     else
     {
@@ -527,19 +507,11 @@
     
     while(maze1F[destRow][destCol] == -1)
     {
-        //system("cls");
-        //printmaze();
         floodStep();
-
-        //printflood();
     }
 
-    //cout << endl << endl;
-
     findPath();
 
-
-
     createDirections();
 }