https://www.greenfoot.org/scenarios/28695
In this little game it does not show up "Draw" or "Crosses wins" or "Noughts wins", instead it immediatly reset. In Greenfoot on the pc it works fine. Does someone know why?
//if there is a variable called "finished" and a method called "finished()" public int timer; public void act() { if(finished) timer++; } public void finished() { if(timer > 20 && Greenfoot.isKeyDown("enter")) Greenfoot.stop(); //or any other method to restart the game }
public void act() { if (Greenfoot.isKeyDown("escape")) Greenfoot.setWorld(new MyWorld()); }