v0.7.5a: fixed issues with figure eight builder not checking for collision properly

This commit is contained in:
Evan Debenham 2019-10-04 02:04:20 -04:00
parent 47fb795682
commit ad420e0b6d

View File

@ -163,7 +163,7 @@ public class FigureEightBuilder extends RegularBuilder {
while (!prev.connect(landmarkRoom)){
ConnectionRoom c = ConnectionRoom.createRoom();
if (placeRoom(firstLoop, prev, c, angleBetweenRooms(prev, entrance)) == -1){
if (placeRoom(rooms, prev, c, angleBetweenRooms(prev, landmarkRoom)) == -1){
return null;
}
firstLoop.add(c);
@ -191,7 +191,7 @@ public class FigureEightBuilder extends RegularBuilder {
while (!prev.connect(landmarkRoom)){
ConnectionRoom c = ConnectionRoom.createRoom();
if (placeRoom(secondLoop, prev, c, angleBetweenRooms(prev, entrance)) == -1){
if (placeRoom(rooms, prev, c, angleBetweenRooms(prev, landmarkRoom)) == -1){
return null;
}
secondLoop.add(c);