The easiest way is probably to remove your boolean 'NewWorld' altogether and change your YesNewWorld method to:
public void YesNewWorld()
{
Greenfoot.setWorld(new Swiat());
}

Counter code: