@@ -85,7 +85,7 @@ public class SurfacesMapGeneration implements Serializable{
list.add(newList.get(k));
}
}
// Now it's time to find the position of the stairs
Randomr=newRandom();
booleanbb=true;
...
...
@@ -98,18 +98,18 @@ public class SurfacesMapGeneration implements Serializable{
posY=rooms[idRoom].getSurface().j1;
if(3*distanceToStart[posY][posX]>2*max_dist){
rooms[idRoom].setType(RoomType.END);
bb=false;// If the distance from the start position to the stairs position is large enough I choose it (compared to the farest point the player can reach)
bb=false;// If the distance from the start position to the stairs position is large enough I choose it (compared to the farest point the player can reach)
return(dY>0&&dX>0)?dX+dY+4:dX+dY;// There's an extra to the distance between rooms that aren't facing each other horizontally or vertically (to avoid corridors with corners in the MST when possible)