示例#1
0
 def test_en_passant_killing_moves(self):
     board = Board(False)
     board.load_fen("8/8/8/8/2pP4/8/7P/8 b kQkq d3 0 1")
     expected_moves_white = set()
     expected_moves_black = set([
         ((2, 3), (3, 2)),
     ])
     self.assertEqual(tuples(board.possible_killing_moves(WHITE)),
                      expected_moves_white)
     self.assertEqual(tuples(board.possible_killing_moves(BLACK)),
                      expected_moves_black)
示例#2
0
 def test_capture_killing_moves(self):
     board = Board(False)
     board.load_fen("8/8/8/8/8/2p5/3P3P/8 w kQkq - 0 1")
     expected_moves_white = set([
         ((3, 1), (2, 2)),
     ])
     expected_moves_black = set([
         ((2, 2), (3, 1)),
     ])
     self.assertEqual(tuples(board.possible_killing_moves(WHITE)),
                      expected_moves_white)
     self.assertEqual(tuples(board.possible_killing_moves(BLACK)),
                      expected_moves_black)