private static void AddCornerWallsWhereNeeded(Map map, IRoom room, int x, int y) { if (map.HasNoRoomOrOutOfBounds(x - 1, y - 1)) { room.AddWallAtLeftBottomCorner(); } if (map.HasNoRoomOrOutOfBounds(x - 1, y + 1)) { room.AddWallAtLeftTopCorner(); } if (map.HasNoRoomOrOutOfBounds(x + 1, y - 1)) { room.AddWallAtRightBottomCorner(); } if (map.HasNoRoomOrOutOfBounds(x + 1, y + 1)) { room.AddWallAtRightTopCorner(); } }
private static void AddOuterWallsWhereNeeded(Map map, IRoom room, int x, int y) { if (map.HasNoRoomOrOutOfBounds(x - 1, y)) { room.AddLeftWall(); } if (map.HasNoRoomOrOutOfBounds(x + 1, y)) { room.AddRightWall(); } if (map.HasNoRoomOrOutOfBounds(x, y - 1)) { room.AddBottomWall(); } if (map.HasNoRoomOrOutOfBounds(x, y + 1)) { room.AddTopWall(); } }