v0.6.0: improved how study and walkway rooms manage corner doors

This commit is contained in:
Evan Debenham 2017-04-09 01:57:32 -04:00
parent fad5fd3f90
commit 9df48e4f88
2 changed files with 12 additions and 4 deletions

View File

@ -54,13 +54,17 @@ public class StudyRoom extends StandardRoom {
for (Point door : connected.values()) {
if (door.x == left) {
Painter.set( level, door.x + 1, door.y, Terrain.EMPTY );
Painter.set( level, door.x + 1, door.y, Terrain.EMPTY_SP );
Painter.set( level, door.x + 2, door.y, Terrain.EMPTY_SP );
} else if (door.x == right) {
Painter.set( level, door.x - 1, door.y, Terrain.EMPTY );
Painter.set( level, door.x - 1, door.y, Terrain.EMPTY_SP );
Painter.set( level, door.x - 2, door.y, Terrain.EMPTY_SP );
} else if (door.y == top) {
Painter.set( level, door.x, door.y + 1, Terrain.EMPTY );
Painter.set( level, door.x, door.y + 1, Terrain.EMPTY_SP );
Painter.set( level, door.x, door.y + 2, Terrain.EMPTY_SP );
} else if (door.y == bottom) {
Painter.set( level, door.x , door.y - 1, Terrain.EMPTY );
Painter.set( level, door.x , door.y - 1, Terrain.EMPTY_SP );
Painter.set( level, door.x , door.y - 2, Terrain.EMPTY_SP );
}
}
Point center = center();

View File

@ -52,12 +52,16 @@ public class WalkwayRoom extends StandardRoom {
door.set( Door.Type.REGULAR );
if (door.x == left) {
Painter.set( level, door.x + 1, door.y, Terrain.EMPTY_SP );
Painter.set( level, door.x + 2, door.y, Terrain.EMPTY_SP );
} else if (door.x == right) {
Painter.set( level, door.x - 1, door.y, Terrain.EMPTY_SP );
Painter.set( level, door.x - 2, door.y, Terrain.EMPTY_SP );
} else if (door.y == top) {
Painter.set( level, door.x, door.y + 1, Terrain.EMPTY_SP );
Painter.set( level, door.x, door.y + 2, Terrain.EMPTY_SP );
} else if (door.y == bottom) {
Painter.set( level, door.x , door.y - 1, Terrain.EMPTY_SP );
Painter.set( level, door.x , door.y - 2, Terrain.EMPTY_SP );
}
}