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)); }
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()); }
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)); } }
public void addPort(Port p) { this.ports.Add(p); }
public Intersection(Point p, Port thePort) : this(p) { port = thePort; }