Exemple #1
0
 public void ChooseCheat_When_OpponentCoops()
 {
     for (int i = 1; i < RoundsToTest; i++)
     {
         Choice choice = Strategy.GetNextChoice(GameScenarios.AllCoop(i), GameScenarios.AllCoop(i));
         Assert.AreEqual(Choice.Cheat, choice);
     }
 }
Exemple #2
0
 public void ChooseCheat_When_OwnPreviousIsCoop()
 {
     for (int i = 1; i < RoundsToTest; i++)
     {
         Choice choice = Strategy.GetNextChoice(GameScenarios.AllCoop(i), GameScenarios.RandomChoices(i));
         Assert.AreEqual(Choice.Cheat, choice);
     }
 }
Exemple #3
0
        public void AlwaysChooseCoop_When_OpponentAlwaysCoops()
        {
            for (int i = 1; i <= RoundsToTest; i++)
            {
                Choice choice = Strategy.GetNextChoice(GameScenarios.RandomChoices(i), GameScenarios.AllCoop(i));

                Assert.AreEqual(Choice.Coop, choice);
            }
        }
Exemple #4
0
 public void ChooseCoop_When_OpponentPreviousIsCoop()
 {
     for (int i = 1; i < RoundsToTest; i++)
     {
         Choice choice = Strategy.GetNextChoice(GameScenarios.RandomChoices(i), GameScenarios.AllCoop(i));
         Assert.AreEqual(Choice.Coop, choice, $"Round {i}");
     }
 }