def depth_first_search():

    def check(col, row):
        if valid_cell(col, row):
            if search(col, row):
                return True
        return False

    def search(col, row):
        print(f'search({col}, {row})')
        pygame.display.update()
        if (grid[(col, row)] == TERMINAL):
            return True
        if (grid[(col, row)] in [WALL, VISITED, PATH]):
            return False
        if (grid[(col, row)] != INITIAL):
            grid[(col, row)] = PATH
            draw_cell(PATH_CELL_COLOR, col, row)
            if check((col - 1), row):
                return True
            if check((col + 1), row):
                return True
            if check(col, (row - 1)):
                return True
            if check(col, (row + 1)):
                return True
            grid[(col, row)] = VISITED
            draw_cell(VISITED_CELL_COLOR, col, row)
            return False
    global processing
    processing = True
    reset_maze()
    draw_grid()
    if check((initial_cell_col - 1), initial_cell_row):
        processing = False
        return
    if check((initial_cell_col + 1), initial_cell_row):
        processing = False
        return
    if check(initial_cell_col, (initial_cell_row - 1)):
        processing = False
        return
    if check(initial_cell_col, (initial_cell_row + 1)):
        processing = False
        return
    processing = False
def depth_first_search():

    def check(col, row):
        if valid_cell(col, row):
            if search(col, row):
                return True
        return False

    def search(col, row):
        print(f'search({col}, {row})')
        pygame.display.update()
        if (grid[(col, row)] == TERMINAL):
            return True
        if (grid[(col, row)] in [WALL, VISITED, PATH]):
            return False
        if (grid[(col, row)] != INITIAL):
            grid[(col, row)] = PATH
            draw_cell(PATH_CELL_COLOR, col, row)
            if check((col - 1), row):
                return True
            if check((col + 1), row):
                return True
            if check(col, (row - 1)):
                return True
            if check(col, (row + 1)):
                return True
            grid[(col, row)] = VISITED
            draw_cell(VISITED_CELL_COLOR, col, row)
            return False
    global processing
    processing = True
    reset_maze()
    draw_grid()
    if check((initial_cell_col - 1), initial_cell_row):
        processing = False
        return
    if check((initial_cell_col + 1), initial_cell_row):
        processing = False
        return
    if check(initial_cell_col, (initial_cell_row - 1)):
        processing = False
        return
    if check(initial_cell_col, (initial_cell_row + 1)):
        processing = False
        return
    processing = False