def move_player():
    my_pos = turtle.pos()
    x_pos = my_pos[0]
    y_pos = my_pos[1]
    x_ok = (LEFT_EDGE <= x_pos <= RIGHT_EDGE)
    y_ok = (UP_EDGE >= y_pos >= DOWN_EDGE)
    within_bounds = (x_ok and y_ok)
    if (turtle.pos()[0] == RIGHT_EDGE):
        turtle.goto((LEFT_EDGE + 20), turtle.pos()[1])
    if (turtle.pos()[0] == LEFT_EDGE):
        turtle.goto((RIGHT_EDGE - 20), turtle.pos()[1])
    global food, score
    if (turtle.pos() in good_food_pos):
        good_food_ind = good_food_pos.index(turtle.pos())
        food.clearstamp(good_food_stamps[good_food_ind])
        good_food_stamps.pop(good_food_ind)
        good_food_pos.pop(good_food_ind)
        print('EATEN GOOD FOOD!')
        score = (score + 1)
        turtle2.clear()
        turtle2.write(str(score))
        good_food()
    if (turtle.pos() in bad_food_pos):
        bad_food_ind = bad_food_pos.index(turtle.pos())
        bad_food.clearstamp(bad_food_stamps[bad_food_ind])
        bad_food_stamps.pop(bad_food_ind)
        bad_food_pos.pop(bad_food_ind)
        print('EATEN BAD FOOD!')
        score = (score - 1)
        turtle2.clear()
        turtle2.write(str(score))
        if (score == (- 5)):
            print('GAME OVER!')
            quit()
        bad_food1()
def move_player():
    my_pos = turtle.pos()
    x_pos = my_pos[0]
    y_pos = my_pos[1]
    x_ok = (LEFT_EDGE <= x_pos <= RIGHT_EDGE)
    y_ok = (UP_EDGE >= y_pos >= DOWN_EDGE)
    within_bounds = (x_ok and y_ok)
    if (turtle.pos()[0] == RIGHT_EDGE):
        turtle.goto((LEFT_EDGE + 20), turtle.pos()[1])
    if (turtle.pos()[0] == LEFT_EDGE):
        turtle.goto((RIGHT_EDGE - 20), turtle.pos()[1])
    global food, score
    if (turtle.pos() in good_food_pos):
        good_food_ind = good_food_pos.index(turtle.pos())
        food.clearstamp(good_food_stamps[good_food_ind])
        good_food_stamps.pop(good_food_ind)
        good_food_pos.pop(good_food_ind)
        print('EATEN GOOD FOOD!')
        score = (score + 1)
        turtle2.clear()
        turtle2.write(str(score))
        good_food()
    if (turtle.pos() in bad_food_pos):
        bad_food_ind = bad_food_pos.index(turtle.pos())
        bad_food.clearstamp(bad_food_stamps[bad_food_ind])
        bad_food_stamps.pop(bad_food_ind)
        bad_food_pos.pop(bad_food_ind)
        print('EATEN BAD FOOD!')
        score = (score - 1)
        turtle2.clear()
        turtle2.write(str(score))
        if (score == (- 5)):
            print('GAME OVER!')
            quit()
        bad_food1()