Esempio n. 1
0
        public virtual IShip AddShip(IShip ship, CoOrdinates initialCoordinate)
        {
            // Add ship
            //
            ship.InitialCoordinate = initialCoordinate;
            List <CoOrdinates> acquireCoordinates = ship.AcquireCoordinates(initialCoordinate);

            this._acquiredCoordinates.AddRange(acquireCoordinates);

            this._ships.Add(ship);

            // Set coordinate mediator for the ship
            //
            this._coordinateMediator.Ship = ship;
            ship.RegisterCoordinateMediator(this._coordinateMediator);

            return(ship);
        }