예제 #1
0
    public DirectionPicker(VirtualMap map, CellLocation location, int changeDirectionModifier, VirtualMap.DirectionType previousDirection)
    {
        this.PreviousDirection       = previousDirection;
        this.PreviousLocation        = location;
        this.ChangeDirectionModifier = changeDirectionModifier;

        foreach (VirtualMap.DirectionType dir in map.directions)
        {
            if (map.HasAdjacentCellInDirection(location, dir) && !map.AdjacentCellInDirectionIsVisited(location, dir))
            {
                directionsPicked.Add(dir);
            }
        }
    }
예제 #2
0
    // Override the constructor for opening dead ends
    public DirectionPicker(VirtualMap map, CellLocation location, VirtualMap.DirectionType previousDirection)
    {
        this.PreviousDirection       = previousDirection;
        this.PreviousLocation        = location;
        this.ChangeDirectionModifier = 100;         // Always change the direction



        foreach (VirtualMap.DirectionType dir in map.directions)
        {
            if (map.HasAdjacentCellInDirection(location, dir) && (LINK_DEAD_ENDS_PASSING_ON_ROCKS || !map.AdjacentCellInDirectionIsRock(location, dir)))
            {
                directionsPicked.Add(dir);
            }
        }
    }