示例#1
0
        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);
        }
示例#2
0
 public Ship(Helm helm)
 {
     this.map  = helm.Map;
     this.helm = helm;
 }