Ejemplo n.º 1
0
 public void TestThatPortAddsIntersection()
 {
     var port = new Port("Ore", 2);
     var intersection = new Intersection(new Point(3, 3), port);
     port.addIntersection(intersection);
     Assert.AreEqual(intersection, port.getIntersections().ElementAt(0));
 }
Ejemplo n.º 2
0
 public void TestGetTradeAmount()
 {
     var port = new Port("Ore", 2);
     var port1 = new Port("Anything", 3);
     Assert.AreEqual(2, port.getTradeAmount());
     Assert.AreEqual(3, port1.getTradeAmount());
 }
Ejemplo n.º 3
0
 public void TestGetResourceType()
 {
     var port = new Port("Ore", 2);
     var port1 = new Port("Anything", 3);
     Assert.AreEqual("Ore", port.getResourceType());
     Assert.AreEqual("Anything", port1.getResourceType());
 }
 public Intersection(Point p)
 {
     coord = p;
     port = null;
     for (int i = 0; i < connections.Capacity; i++)
     {
         connections.Add(new Connection(null, null));
     }
 }
Ejemplo n.º 5
0
 public void addPort(Port p)
 {
     this.ports.Add(p);
 }
 public Intersection(Point p, Port thePort)
     : this(p)
 {
     port = thePort;
 }