예제 #1
0
 public virtual Continent AddNode(Continent c)
 {
     if (!continents.ContainsKey(c.Name))
     {
         continents.Add(c);
         return c;
     }
     else
         throw new ArgumentException("There already exists a node in the graph with name " + c.Name);
 }
예제 #2
0
 /// <summary>
 /// Removes a Continent from the NodeList.
 /// </summary>
 public virtual void Remove(Continent c)
 {
     data.Remove(c.Name);
 }
예제 #3
0
 public virtual bool Contains(Continent c)
 {
     return ContainsContinent(c.Name);
 }
예제 #4
0
 /// <summary>
 /// Adds a new Continent to the NodeList.
 /// </summary>
 public virtual void Add(Continent c)
 {
     data.Add(c.Name, c);
 }