function stupidPathfinder(map) { // CONSTANTS var width=map[1].length; var height=map.length; var left=-1; var right=1; var up=-width; var down=width; var nothing=0; var start=1; var end=2; var wall=3; var START, END; var WALL = []; // the number of start, end, wall. for (i=0;i<map.length;i++) { for (j=0;j<map[i].length;j++) { if (map[i][j] === wall) { WALL.push(i*width+j); } if (map[i][j] === start) { START=i*width+j; } if (map[i][j] === end) {
user6820627
user6820627
user6820627
user6820627
user6820627
user6754053
user6754053
user6754053