public static DIRECTIONS[] IntersectDirections(Hexagon[] hexagons) { List tempList = new List(); foreach (var h in hexagons) { foreach (var direction in h.Connections.Where(direction => !tempList.Contains(direction))) { tempList.Add(direction); } } return tempList.ToArray(); }