Esempio n. 1
0
 public void Match(Tile other)
 {
     Edges.Where(m => other.Edges.Any(n => n == m))
     .ToList()
     .ForEach(x =>
     {
         MatchedEdges.Add(new KeyValuePair <int, string>(other.Id, x));
         other.MatchedEdges.Add(new KeyValuePair <int, string>(Id, x));
     });
 }
Esempio n. 2
0
 public void OrientEdges()
 {
     NeighboringEdges = (Positions)MatchedEdges.Select(kvp => new { Index = 1 << Edges.IndexOf(kvp.Value) })
                        .Where(a => a.Index < 1 << 4)
                        .Aggregate(0, (a, b) => a + b.Index);
 }