Esempio n. 1
0
 def test_ai_player_negamax(self):
     timer = MockTimer()
     chess = MockChess()
     player = AIPlayer(WHITE, timer, chess, EASY)
     player.openings = {}
     player.ai_move()
     self.assertNotEqual(chess.selected, None)
     self.assertEqual(chess.played, True)
Esempio n. 2
0
 def test_ai_player_semi_random_move(self):
     timer = MockTimer()
     chess = MockChess()
     player = AIPlayer(WHITE, timer, chess, SEMI_RANDOM)
     openings = player.openings
     player.ai_move()
     self.assertEqual(player.openings, openings)
     self.assertNotEqual(chess.selected, None)
     self.assertEqual(chess.played, True)