Exemple #1
0
        private void Attack(Peoples p, int MaxUron)
        {
            int _uronForLog;

            if (p != null)
            {
                Random rnd = new Random();
                _uronForLog = rnd.Next(MaxUron);
                p.Ranenie(_uronForLog);
                PrintHP();
                _battleLog.Add(string.Format("{0} получил {1} пунктов урона, текущее здоровье {2}", p.Name, _uronForLog, p.HPNow));
            }
        }
Exemple #2
0
 private void ChelovechekButton_Click(object sender, RoutedEventArgs e)
 {
     ActivCanvas.Children.Clear();
     LogText.Content = string.Empty;
     _typePrint      = TypePrint.Chelovechek;
     countTick       = TimeStrelkaY = 0;
     TimeStrelkaX    = 50;
     FirstCanvas.Children.Clear();
     SecondCanvas.Children.Clear();
     p1 = new Peoples("Blue");
     p2 = new Peoples("Green");
     PrintHP();
 }