private void LayoutFloor(List <Room> floorRooms, int floor)
    {
        building.maxDimensions = LevelGenRoomUtils.CalculateMaxDimensions(floorRooms, building.numFloors);
        floorRooms             = LevelGenRoomUtils.RandomizeOrder(floorRooms);
        AddStartingCorridors(floor, building.maxDimensions, floorRooms.Count);
        Vector2 entranceLocation = new Vector2(0, 0);
        Vector2 exitLocation     = new Vector2(0, 0);

        entranceLocation = GetEntranceLocation(floor, building.rooms, building.grid);
        exitLocation     = GetExitLocation(floor, building.rooms, building.grid, entranceLocation);
        if (floor == 0)
        {
            building.grid[floor, (int)entranceLocation.x, (int)entranceLocation.y] = "E";
        }
        else
        {
            building.grid[floor, (int)entranceLocation.x, (int)entranceLocation.y] = "<";
        }
        if (floor < building.numFloors - 1)
        {
            building.grid[floor, (int)exitLocation.x, (int)exitLocation.y] = ">";
        }
        foreach (var room in floorRooms)
        {
            LevelGenRoomUtils.PackRoom(room, floor, building);
        }
        LevelGenConnectorUtils.ConnectRooms(floor, floorRooms, building);
    }
    private bool ConnectRoomSets(int floor, List <Room> set1, List <Room> set2)
    {
        var room1 = set1[Random.Range(0, set1.Count)];
        var room2 = set2[Random.Range(0, set2.Count)];
        var value = LevelGenConnectorUtils.ConnectTwoRooms(floor, building, room1, room2);

        return(value);
    }
 private void ConnectOrphanedStaircase(int x, int y, int floor)
 {
     LevelGenConnectorUtils.ConnectSingleBlock(x, y, floor, building);
 }