So like what raimondz said, in the for loop code you have it setting up the trees. Every time that code runs, the program picks new random x,y coordinates and places a sprite there. In the code for while you are playing the game, all you want in your for loop is the spofs.