Пример #1
0
 def test_sing_real_envido_and_only_can_sing_falta_envido(self):
     player = CPUPlayer('mocky')
     all_ready_envidos = ['REAL_ENVIDO']
     self.assertEqual(
         player.choose_one_action(all_ready_envidos),
         ['ACCEPTED', 'REJECTED', 'FALTA_ENVIDO'],
     )
Пример #2
0
 def test_player_ask_envido_when_there_are_not_more_sings(self):
     player = CPUPlayer('CPY')
     all_ready_envidos = ['FALTA_ENVIDO']
     self.assertEqual(
         player.choose_one_action(all_ready_envidos),
         ['ACCEPTED', 'REJECTED'],
     )
Пример #3
0
 def test_player_ask_falta_envido(self):
     player = CPUPlayer('CPY')
     all_ready_envidos = ['REAL_ENVIDO', 'ENVIDO', 'ENVIDO']
     self.assertEqual(
         player.choose_one_action(all_ready_envidos),
         ['ACCEPTED', 'REJECTED', 'FALTA_ENVIDO'],
     )
Пример #4
0
 def __init__(self):
     self.players = [HumanPlayer('P1'), CPUPlayer('P2')]
     self.cantos_envidos = []
     self.is_playing = True
     self.hand = Hand()
Пример #5
0
 def test_ask_envido_one(self, mock):
     cpu = CPUPlayer('NOMBRE')
     result = cpu.ask_envido("ANY")
     self.assertTrue(result in ['ACCEPTED', 'REJECTED'])
Пример #6
0
 def test_ask_truco_three(self):
     cpu = CPUPlayer('NOMBRE')
     result = cpu.ask_trucos(["TRUCO", "RE_TRUCO", "VALE_CUATRO"])
     self.assertTrue(result in ['ACCEPTED', 'REJECTED'])
Пример #7
0
 def test_choose_one_action_ford(self):
     cpu = CPUPlayer('NOMBRE')
     result = cpu.choose_one_action(["ENVIDO", "ENVIDO"])
     self.assertEqual(
         result, ['ACCEPTED', 'REJECTED', "FALTA_ENVIDO", "REAL_ENVIDO"])