def test_get_state_distribution_from_history(self): player = self.player() history_1 = [C, C, D, D, C] history_2 = [C, D, C, D, D] get_state_distribution_from_history(player, history_1, history_2) self.assertEqual( player.state_distribution, {(C, C): 1, (C, D): 2, (D, C): 1, (D, D): 1} )
def test_get_state_distribution_from_history(self): player = self.player() history_1 = [C, C, D, D, C] history_2 = [C, D, C, D, D] get_state_distribution_from_history(player, history_1, history_2) self.assertEqual(player.state_distribution, { (C, C): 1, (C, D): 2, (D, C): 1, (D, D): 1 })