Programming on your favorite platform, for your favorite platform? Post here
2 posts • Page 1 of 1
When the mouse coordinates hit the object, you should destroy it, and generate another object at random (x,y) position. To move an object and not draw on top of it, you should redraw the frame.
Code: Select all
while True : if (check_for_collision(x, y)) : redraw_screen(); generate_ball(); draw_ball(x,y); collisions++; if(collisions > 5) exit;