i need help changing the background of the game when the score reaches a certain amount.
public class Rocket extends Actor
{
int score = 0;
/**
* Act - do whatever the Rocket wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
setLocation(getX(),getY()-20);
addScore();
checktop();
if (score ==5)
{
getWorld().setBackground(new GreenfootImage("brick.jpg"));
}
}

