public bool TryFindShipParent(Helm helm, out Ship foundShip) { foreach (var ship in ships) { if (ship.helm == helm) { foundShip = ship; return(true); } } foreach (var ship in ships) { if (ship.terrains.Keys.Contains(helm.Position)) { foundShip = ship; return(true); } } foundShip = null; return(false); }
public Ship(Helm helm) { this.map = helm.Map; this.helm = helm; }