I'm trying to create a Random Dungeon, and I'm failing at the first step.
I've got an array that represents the Dungeon and the cells are the Rooms. When I place a Room, I check to see if I should put an exit in that direction (the value of the adjacent cell is 0 and we aren't at the start/finish of the row/column). If the conditions are met, I modify the Room value at bit level so that the room has an exit on that direction.
I think I'm doing it right, but I'm clearly not. I've tryed introducing some values at hand on the array and calling the function to check the surrounded cells, and if the start/finish conditions are commented, it works.
The .capx is commented and the names are self explatanatory. I'd appreciate if someone could check the .capx and let me know what I'm doing wrong.
Thanks in advance.