how to make game over
if ( << some condition >> )
/** followed by */
// either this:
{
World world = getWorld();
world.addObject(new GameOver(), world.getWidth()/2, world.getHeight()/2);
Greenfoot.stop();
return;
}
// or this:
{
addObject(new GameOver(), getWidth()/2, getHeight()/2);
Greenfoot.stop();
return;
}{
Greenfoot.setWorld(new GameOver());
return;
}public void act()
{
# no mess with it;
}