if (getWorld().getObjects(Rock.class).isEmpty()) { Greenfoot.setWorld(new Space1());
if (getWorld().getObjects(Rock.class).isEmpty()) { Greenfoot.setWorld(new Space1());
Space1 space1 = (Space1)getWorld();
Space1 space1 = new Space1(); Greenfoot.setWorld(space1);