Пример #1
0
        public void setUpByEdge(Edge TempEdge,bool isBothWay)
        {
            var result = TableOfMazes.Select(i =>
            {
                if (i.VertexNumber == TempEdge.Source()) i.Neigboors.Add(TempEdge.Dest());
                return i;
            }).ToList();
            if (isBothWay)
            {
                var resultTwo = TableOfMazes.Select(i =>
                    {
                        if (i.VertexNumber == TempEdge.Dest()) i.Neigboors.Add(TempEdge.Source());
                        return i;
                    }).ToList();
            }
             //   var temp = TableOfMazes.FirstOrDefault(c => c.VertexNumber == TempEdge.Source());
              //  if (temp != null)
              //  {
              //  Debug.WriteLine("kjhjkhjkhjk");
             //  // temp.Neigboors.Add(TempEdge.Dest());
             ////   }
             //   var temp = TableOfMazes.Find(r => (r.VertexNumber == TempEdge.Source()));
              //      temp.Neigboors.Add(TempEdge.Dest());
            //    TableOfMazes.ElementAt(r => (r.VertexNumber == TempEdge.Source())).Neigboors.Add(TempEdge.Dest());

               // TableOfMazes.ElementAtOrDefault(TempEdge.Source());
              //  TableOfMazes
        }