Implemented bi-directional linking between rooms
This commit is contained in:
parent
e0c65bd66e
commit
eb7c43a4f1
2 changed files with 30 additions and 47 deletions
|
|
@ -46,14 +46,6 @@ namespace DungeonGenerator
|
|||
return dungeonMap;
|
||||
}
|
||||
|
||||
enum RoomSide
|
||||
{
|
||||
Top,
|
||||
Bottom,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
|
||||
private void AddNormalRoomsAroundMonsterRooms(DungeonMap dungeon)
|
||||
{
|
||||
HashSet<Point> unoccupiedPoints = dungeon.GetUnoccupiedPoints();
|
||||
|
|
@ -130,6 +122,7 @@ namespace DungeonGenerator
|
|||
Room newRoom = CreateAdjacentRoom(RoomType.Normal, unoccupiedPointsOnSide, side);
|
||||
if (newRoom != null)
|
||||
{
|
||||
monsterRoom.AddAdjacentRoom(newRoom, side);
|
||||
newRooms.Add(newRoom);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue