2

Irene is right to suggest what she did, but that's not your problem. Your code is detecting a collision between the ball and the score. When it detects the collision, it removes the object, which happens to be the score. Also, since the ball starts out in the same position as the score (maybe a poor design choice in itself) and hides it, the collision is ...


1

Looking at your code, I see two issues. First, you call initScoreboard twice, once before starting the while loop and once just inside the loop, without assigning the object to a variable. Instantiating the scoreboard once should be enough. I think that doing it with every pass through the loop will just cause problems. // instantiate scoreboard, centered ...


Only top voted, non community-wiki answers of a minimum length are eligible