diff --git a/DS-B/routeplanner/main.c b/DS-B/routeplanner/main.c index b922e2e..6dfba6b 100644 --- a/DS-B/routeplanner/main.c +++ b/DS-B/routeplanner/main.c @@ -82,7 +82,6 @@ int main(void) { /* the **algorithm**, trace*/ while (currentCell.x != targetCell.x || currentCell.y != targetCell.y) { - //printf("test\n"); const int neighbours[4][2]={{1,0},{0,1},{0,-1},{-1,0}}; for (int i = 0; i < 4; i++) { cell neighbourCell; @@ -93,30 +92,6 @@ int main(void) { break; } } - /*int moved=0; - if (currentCell.x!=12) { - if (assignmentMatrix[currentCell.x+1][currentCell.y] < assignmentMatrix[currentCell.x][currentCell.y] && assignmentMatrix[currentCell.x+1][currentCell.y] != -1) { - currentCell.x=currentCell.x+1; - moved=1; - } - } - if (currentCell.x!=0 && moved==0) { - if (assignmentMatrix[currentCell.x-1][currentCell.y] < assignmentMatrix[currentCell.x][currentCell.y] && assignmentMatrix[currentCell.x-1][currentCell.y] != -1) { - currentCell.x=currentCell.x-1; - moved=1; - } - } - if (currentCell.y!=12 && moved==0) { - if (assignmentMatrix[currentCell.x][currentCell.y+1] < assignmentMatrix[currentCell.x][currentCell.y] && assignmentMatrix[currentCell.x][currentCell.y+1] != -1) { - currentCell.y=currentCell.y+1; - moved=1; - } - } - if (currentCell.y!=0 && moved==0) { - if (assignmentMatrix[currentCell.x][currentCell.y-1] < assignmentMatrix[currentCell.x][currentCell.y] && assignmentMatrix[currentCell.x][currentCell.y-1] != -1) { - currentCell.y=currentCell.y-1; - } - }*/ if ( isValidCrossing(¤tCell)) { printCrossingName(currentCell.x, currentCell.y); }