public Port GetPort(string portName) { foreach (Port port in portList) { if (portName == port.GetPortName()) { this.port = port; } } return this.port; }
public void InitializePorts() { Port tartuga = new Port("Tortuga", setPrice); Port blackwater = new Port("Black Water Bay", setPrice); Port providence = new Port("Providence", setPrice); Port shipwreck = new Port("Shipwreck Cove", setPrice); Port freePort = new Port("Free Port", setPrice); Port islaDeMuerta = new Port("Isla de Muerta", setPrice); portList.Add(tartuga); portList.Add(blackwater); portList.Add(providence); portList.Add(shipwreck); portList.Add(freePort); portList.Add(islaDeMuerta); }