예제 #1
0
 public void RemoveArc(MazeArc arc)
 {
     mazeGraphArcs.Remove(arc);
     arc.from.IncommingGraphArcs.Remove(arc);
     arc.from.OutgoingGraphArcs.Remove(arc);
     arc.to.IncommingGraphArcs.Remove(arc);
     arc.to.OutgoingGraphArcs.Remove(arc);
 }
예제 #2
0
 public void AddArc(MazeNode from, MazeNode to)
 {
     MazeArc newArc = new MazeArc(from, to);
     if (!mazeGraphArcs.Contains(newArc))
     {
         mazeGraphArcs.Add(newArc);
         from.addOutgoingGraphArc(newArc);
         to.addIncommingGraphArc(newArc);
     }
 }
예제 #3
0
 public void addOutgoingGraphArc(MazeArc arc)
 {
     if (!outgoingGraphArcs.Contains(arc))
         outgoingGraphArcs.Add(arc);
 }
예제 #4
0
 public void addIncommingGraphArc(MazeArc arc)
 {
     if (!incommingGraphArcs.Contains(arc))
         incommingGraphArcs.Add(arc);
 }