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); }
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); } }
public void addOutgoingGraphArc(MazeArc arc) { if (!outgoingGraphArcs.Contains(arc)) outgoingGraphArcs.Add(arc); }
public void addIncommingGraphArc(MazeArc arc) { if (!incommingGraphArcs.Contains(arc)) incommingGraphArcs.Add(arc); }