def test_hindered_in_a_board_with_just_a_knight(self): board = Board(False) board.load_fen("8/8/8/4N3/8/8/8/8 w kQkq - 0 1") expected_hindered_white = set([ (3, 2), (5, 2), (6, 3), (6, 5), (5, 6), (3, 6), (2, 5), (2, 3) ]) expected_hindered_black = set() self.assertEqual(board.hindered(WHITE), expected_hindered_white) self.assertEqual(board.hindered(BLACK), expected_hindered_black) self.assertEqual(board.hindered(-1), expected_hindered_white)
def test_hindered_in_a_new_game(self): board = Board(True) expected_hindered_white = set([ (0, 2), (1, 2), (2, 2), (3, 2), (4, 2), (5, 2), (6, 2), (7, 2) ]) expected_hindered_black = set([ (0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (7, 5) ]) self.assertEqual(board.hindered(WHITE), expected_hindered_white) self.assertEqual(board.hindered(BLACK), expected_hindered_black) self.assertEqual(board.hindered(-1), expected_hindered_white)