Пример #1
0
 public void TestAttack(IPlayer player)
 {
     String failMsg = player.PlayerName + " Failed TestAttack ";
     List<Coordinate> attacks = new List<Coordinate>();
     for (int i = 0; i < 30; i++)
     {
         Coordinate atk = player.Attack();
         Assert.IsTrue(!attacks.Contains(atk), failMsg + "Repeated Attack");
         attacks.Add(atk);
         if (i % 2 == 0) { player.UpdateAttackResults(atk, AttackResult.Hit, false); }
         else { player.UpdateAttackResults(atk, AttackResult.Miss, false);  }
     }
 }