def get_capturable_pieces(self, index):
    "\n        Get all squares that contain opponent's pieces capturable from the specified position.\n        "
    own_color = self.owner[index]
    own_class = self.piece_class[index]
    visibility_range = (BoardConfig.board_dim if (own_class == PieceClass.KING) else 2)
    lines_of_sight = get_lines_of_sight(index, visibility_range)
    result = []
    for line in lines_of_sight:
        for i in range(0, (len(line) - 1)):
            if (self.owner[line[i]] in (own_color, Player.ZOMBIE)):
                break
            if (self.owner[line[i]] and self.owner[line[(i + 1)]]):
                break
            if (self.owner[line[i]] and (self.owner[line[i]] != own_color) and (not self.owner[line[(i + 1)]])):
                result.append(line[i])
                break
    return result
Get all squares that contain opponent's pieces capturable from the specified position.
def get_capturable_pieces(self, index):
    "\n        \n        "
    own_color = self.owner[index]
    own_class = self.piece_class[index]
    visibility_range = (BoardConfig.board_dim if (own_class == PieceClass.KING) else 2)
    lines_of_sight = get_lines_of_sight(index, visibility_range)
    result = []
    for line in lines_of_sight:
        for i in range(0, (len(line) - 1)):
            if (self.owner[line[i]] in (own_color, Player.ZOMBIE)):
                break
            if (self.owner[line[i]] and self.owner[line[(i + 1)]]):
                break
            if (self.owner[line[i]] and (self.owner[line[i]] != own_color) and (not self.owner[line[(i + 1)]])):
                result.append(line[i])
                break
    return result