Ejemplo n.º 1
0
        public BattleArea(string name, char height, char width)
        {
            this._name   = name;
            this._height = height;
            this._width  = width;
            this._acquiredCoordinates = new List <CoOrdinates>();
            this._ships = new List <IShip>();

            // CoordinateMediator is used to pass the updates co-ordinates from the ship object to the battle area object.
            //
            this._coordinateMediator            = new CoOrdinateConcreteMediator();
            this._coordinateMediator.BattleArea = this;
        }
Ejemplo n.º 2
0
 public void RegisterCoordinateMediator(CoOrdinateMediator mediator)
 {
     // Set the coordinate mediator.
     //
     this._coordinateMediator = mediator;
 }