Previous sprites staying when changing y_positions to move
<p>I'm making a game where the player controls a sprite that catches falling food.</p>

<p>However, I'm having trouble with the falling food part.</p>

<pre><code>import pygame
import random
import time

d_w = 800
d_h = 600
fall_speed = 5

screen = pygame.display.set_mode((d_w, d_h))

clock = pygame.time.Clock()

BGCOLOR = (0, 155, 0)

goodFood = pygame.image.load('burg.png')

def randFoodGen():
    x_food = d_w/2
    y_food = 0
    return x_food,y_food

def BurgGen():
    x_food, y_food = randFoodGen()
    screen.fill(BGCOLOR)
    while True:
        y_food = y_food + fall_speed
        if y_food &gt; d_w:
            x_food = (random.randrange(0, d_w))
            y_food = -30
        screen.blit(goodFood, [x_food, y_food])
        pygame.display.update()
        clock.tick(30)

BurgGen()
</code></pre>

<p>It ends up keeping the previous position of the falling food sprite, like this:
<a href="http://i.stack.imgur.com/36DBm.png" rel="nofollow">Anger</a></p>