Esempio n. 1
0
 def test_promotion_errors(self):
     position = self.fen_to_board('n1n5/PPPk4/8/8/8/8/4Kppp/5N1N')
     chess_position = ChessPosition(position, 1)
     moves = chess_position.get_moves_for_depth(1)
     self.assertEqual(len(moves), 24)
     moves = chess_position.get_moves_for_depth(2)
     self.assertEqual(len(moves), 520)
Esempio n. 2
0
 def test_promotion_errors(self):
     position = self.fen_to_board('n1n5/PPPk4/8/8/8/8/4Kppp/5N1N')
     chess_position = ChessPosition(position, 1)
     moves = chess_position.get_moves_for_depth(1)
     self.assertEqual(len(moves), 24)
     moves = chess_position.get_moves_for_depth(2)
     self.assertEqual(len(moves), 520)
Esempio n. 3
0
 def test_starting_position(self):
     position = self.fen_to_board('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')
     chess_position = ChessPosition(position, 1)
     moves = chess_position.get_moves_for_depth(1)
     self.assertEqual(len(moves), 20)
     moves = chess_position.get_moves_for_depth(2)
     self.assertEqual(len(moves), 420)
     moves = chess_position.get_moves_for_depth(3)
     self.assertEqual(len(moves), 9322)
Esempio n. 4
0
 def test_starting_position(self):
     position = self.fen_to_board(
         'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')
     chess_position = ChessPosition(position, 1)
     moves = chess_position.get_moves_for_depth(1)
     self.assertEqual(len(moves), 20)
     moves = chess_position.get_moves_for_depth(2)
     self.assertEqual(len(moves), 420)
     moves = chess_position.get_moves_for_depth(3)
     self.assertEqual(len(moves), 9322)