Пример #1
0
        public ShootResult Shoot(int x, int y)
        {
            ShootResult hitType = this.battleMap.Hit(x, y);

            if (hitType.IsCorrectly == false)
            {
                return(hitType);
            }

            Steps++;
            return(hitType);
        }
Пример #2
0
 public void NextTurn(int x, int y)
 {
     try
     {
         ShootResult typeHit = this.Player.Shoot(x, y);
         this.UserInterface.ShowInformationAboutShootResult(typeHit);
         if (this.Player.IsThereAnyLiveElement() == false)
         {
             this.Player.SetBestSteps();
             this.UserInterface.ShowWinnerInformation(this.Player.Steps, this.Player.BestSteps);
         }
     }
     catch (Exception ex)
     {
         this.UserInterface.ShowError(ex);
     }
 }