I have this code where everything gets removed, but i need for all except one actor to be removed, how do i do that
Actor collided = getOneIntersectingObject(End.class);
if(collided != null)//if you have not run into it
{
World world = getWorld();
world.removeObjects(world.getObjects(null)); //removes all the objects in the world;
world.addObject(new Congrats(), world.getWidth()/2, world.getHeight()/2);
Greenfoot.stop();
Greenfoot.playSound("Pacman.wav");
}

