AutoSharp.Utils.Positioning.EnemyZone C# (CSharp) Method

EnemyZone() static private method

Returns a list of points in the Enemy Zone
static private EnemyZone ( ) : System.Collections.Generic.List>
return System.Collections.Generic.List>
        internal static Paths EnemyZone()
        {
            var teamPolygons = new List<Geometry.Polygon>();
            foreach (var hero in Heroes.EnemyHeroes.Where(h => !h.IsDead && h.IsVisible))
            {
                teamPolygons.Add(GetChampionRangeCircle(hero).ToPolygon());
            }
            var teamPaths = Geometry.ClipPolygons(teamPolygons);
            var newTeamPaths = teamPaths;
            foreach (var pathList in teamPaths)
            {
                Path wall = new Path();
                foreach (var path in pathList)
                {
                    if (Utility.IsWall(new Vector2(path.X, path.Y)))
                    {
                        wall.Add(path);
                    }
                }
                newTeamPaths.Remove(wall);
            }
            return newTeamPaths;
        }