def pick_low_num_for_streak(self): greedyAgent = GreedyAgent("greedy") greedyAgent.cards = [(2, "Fire"), (3, "Ice"), (4, "Water")] greedyAgent.pickCard() greedyAgent.accumulatedCards["Water"] += 1 greedyAgent.cards.append((1, "Water")) greedyAgent.cards.append((0, "Water")) greedyAgent.pickCard() self.assertEqual(greedyAgent.playedCard, (1, "Water")) greedyAgent.accumulatedCards["Water"] += 1 greedyAgent.pickCard() self.assertEqual(greedyAgent.playedCard, (0, "Water"))
def pick_random(self): greedyAgent = GreedyAgent("greedy") greedyAgent.cards = [(3, "Fire"), (3, "Ice"), (3, "Water")]
def pick_highest_num_test(self): greedyAgent = GreedyAgent("greedy") greedyAgent.cards = [(2, "Fire"), (3, "Ice"), (4, "Water")] greedyAgent.pickCard() self.assertEqual(greedyAgent.playedCard, (4, "Water"))