public void AddNode(string name) { // make sure this node has not been added if (this.Nodes.ContainsKey(name)) { return; } // create the node object giving it a name var node = new Node(name); // name is the key in the dictionary (comes from constants), node is also created with this name value this.Nodes.Add(name, node); }
public NodeConnection(Node target, double distance, ConnectionMedium connectionMedium) { this.Target = target; this.Distance = distance; this.ConnectionMedium = connectionMedium; }