AIsOfCatan.StarterAgent.GetEdgeBetween C# (CSharp) Method

GetEdgeBetween() private method

private GetEdgeBetween ( Intersection first, Intersection second ) : Edge
first AIsOfCatan.API.Intersection
second AIsOfCatan.API.Intersection
return Edge
        private Edge GetEdgeBetween(Intersection first, Intersection second)
        {
            int[] result = first.ToArray().Where(i => second.ToArray().Contains(i)).ToArray();
            if (result.Length < 2) return null;
            return new Edge(result[0], result[1]);
        }