Ejemplo n.º 1
0
        public virtual FloorPathBranch <T> .ListPathBranchExpansion?ChooseRoomExpansion(IRandom rand, FloorPlan floorPlan)
        {
            List <RoomHallIndex> availableExpansions = new List <RoomHallIndex>();

            for (int ii = 0; ii < floorPlan.RoomCount; ii++)
            {
                if (!BaseRoomFilter.PassesAllFilters(floorPlan.GetRoomPlan(ii), this.Filters))
                {
                    continue;
                }
                availableExpansions.Add(new RoomHallIndex(ii, false));
            }

            for (int ii = 0; ii < floorPlan.HallCount; ii++)
            {
                if (!BaseRoomFilter.PassesAllFilters(floorPlan.GetHallPlan(ii), this.Filters))
                {
                    continue;
                }
                availableExpansions.Add(new RoomHallIndex(ii, true));
            }

            return(FloorPathBranch <T> .ChooseRoomExpansion(this.PrepareRoom, this.HallPercent, rand, floorPlan, availableExpansions));
        }