From 5ff8392c2880be53a063c45337fe0c77dc500a30 Mon Sep 17 00:00:00 2001 From: Nanokloon Date: Fri, 21 Mar 2025 14:31:18 +0100 Subject: [PATCH] without comments --- DS-B/routeplanner/main.c | 25 ------------------------- 1 file changed, 25 deletions(-) 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); }