Hello, i need some help can somebody give me a simple way to stop my game after some time with a timer or something like that i really need it for school.
int timer=600;
public void act()
{
timer--;
if(timer<1) Greenfoot.stop();
getWorld().showText("Time: "+timer/60, 150, 150);
}