예제 #1
0
        public virtual IBattleArea Clone()
        {
            BattleArea battleArea = (BattleArea)this.MemberwiseClone();

            battleArea._acquiredCoordinates = new List <CoOrdinates>();
            battleArea._ships = new List <IShip>();
            battleArea._coordinateMediator            = new CoOrdinateConcreteMediator();
            battleArea._coordinateMediator.BattleArea = battleArea;

            return(battleArea);
        }
예제 #2
0
 /// <summary>
 /// Create a Battle Area
 /// </summary>
 /// <param name="iWidth_"></param>
 /// <param name="chHeight_"></param>
 public void CreateBattelArea(int iWidth_, char chHeight_)
 {
     battleArea = new BattleArea(iWidth_, chHeight_);
 }