def divide(col1, row1, col2, row2):
    vertical = col2
    if ((col2 - col1) > 2):
        vertical = int((((col2 - col1) / 2) + col1))
        for row in range(row1, row2):
            draw_cell(WALL_CELL_COLOR, vertical, row)
            grid[(vertical, row)] = WALL
    horizontal = row2
    if ((row2 - row1) > 2):
        horizontal = int((((row2 - row1) / 2) + row1))
        for col in range(col1, col2):
            draw_cell(WALL_CELL_COLOR, col, horizontal)
            grid[(col, horizontal)] = WALL
    new_col1 = col1
    new_row1 = row1
    new_col2 = vertical
    new_row2 = horizontal
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    new_col1 = (vertical + 1)
    new_row1 = row1
    new_col2 = col2
    new_row2 = horizontal
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    new_col1 = col1
    new_row1 = (horizontal + 1)
    new_col2 = vertical
    new_row2 = row2
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    new_col1 = (vertical + 1)
    new_row1 = (horizontal + 1)
    new_col2 = col2
    new_row2 = row2
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    time.sleep(SMALL_SLEEP)
    pygame.display.update()
    return (vertical, horizontal)
def divide(col1, row1, col2, row2):
    vertical = col2
    if ((col2 - col1) > 2):
        vertical = int((((col2 - col1) / 2) + col1))
        for row in range(row1, row2):
            draw_cell(WALL_CELL_COLOR, vertical, row)
            grid[(vertical, row)] = WALL
    horizontal = row2
    if ((row2 - row1) > 2):
        horizontal = int((((row2 - row1) / 2) + row1))
        for col in range(col1, col2):
            draw_cell(WALL_CELL_COLOR, col, horizontal)
            grid[(col, horizontal)] = WALL
    new_col1 = col1
    new_row1 = row1
    new_col2 = vertical
    new_row2 = horizontal
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    new_col1 = (vertical + 1)
    new_row1 = row1
    new_col2 = col2
    new_row2 = horizontal
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    new_col1 = col1
    new_row1 = (horizontal + 1)
    new_col2 = vertical
    new_row2 = row2
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    new_col1 = (vertical + 1)
    new_row1 = (horizontal + 1)
    new_col2 = col2
    new_row2 = row2
    if (((new_col2 - new_col1) > 2) or ((new_row2 - new_row1) > 2)):
        (new_vertical, new_horizontal) = divide(new_col1, new_row1, new_col2, new_row2)
        make_holes(new_col1, new_row1, new_col2, new_row2, new_vertical, new_horizontal)
    time.sleep(SMALL_SLEEP)
    pygame.display.update()
    return (vertical, horizontal)