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); } }
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); } }
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); } }
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}"); } }