ToArray() public method

public ToArray ( ) : int[]
return int[]
Beispiel #1
0
 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]);
 }
Beispiel #2
0
 private int DifferentTypes(Intersection inter, IBoard board)
 {
     return inter.ToArray().Select(i => board.GetTile(i).Terrain).Where(t => t != Terrain.Water && t != Terrain.Desert).Distinct().Count();
 }