Hello! I am trying to make it so that when you press a button (Buttons class with Falsebutton/Truebutton subclasses under it) 5 times, the program stops. How do I do this?
public static int clicks;
clicks = 0;
MyWorld.clicks++;
if (clicks == 5) Greenfoot.stop();