Implemented bi-directional linking between rooms

This commit is contained in:
Max 2025-02-06 15:02:21 +01:00
parent e0c65bd66e
commit eb7c43a4f1
2 changed files with 30 additions and 47 deletions

View file

@ -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);
}
}