Compare commits

..

No commits in common. "56146689b4df0db3802231546497eef88a69bb2a" and "5236a776fb8c1ff381acc902c379ff835e33e3a8" have entirely different histories.

View File

@ -7,8 +7,8 @@
#define W 15 /* ancho y alto del laberinto -1 */ #define W 15 /* ancho y alto del laberinto -1 */
struct maze { /* Distancias de Manhattan */ struct maze { /* Distancias de Manhattan */
int vwalls[16][16]; int vwalls[15][15];
int hwalls[16][16]; int hwalls[15][15];
int mhtn[16][16]; int mhtn[16][16];
} maze; } maze;
@ -23,8 +23,8 @@ void updatepos(class mmstats *mms);
void locateWall(struct maze &maze); void locateWall(struct maze &maze);
void flood(struct maze *maze, struct mmstats *mmstats, int coordinates[2]) { void flood(struct maze *maze, struct mmstats *mmstats, int coordinates[2]) {
int i = 0, j = 0; int i, j;
int prevNum = 0; int prevNum;
int marked[16][16] = {0}; int marked[16][16] = {0};
std::queue<fill> myqueue; std::queue<fill> myqueue;
@ -36,7 +36,7 @@ void flood(struct maze *maze, struct mmstats *mmstats, int coordinates[2]) {
prevNum = myqueue.front().z; prevNum = myqueue.front().z;
myqueue.pop(); myqueue.pop();
if (i < 0 || i > W || j < 0 || j > W || marked[i][j]) { if (i < 0 || i > W || j < 0 || j > W || marked[i][j] == 1) {
continue; continue;
} else { } else {
API::setText(i, j, prevNum + 1); API::setText(i, j, prevNum + 1);