So I am making a game but I have ran into a small bug/ problem. Basically when the buttons 3, 2, or 1 and are pressed in order the counter goes down on screen, but the problem is that when the buttons are pressed out of order they get all mixed up and such. In a nutshell I want the numbers on screen to count down from 3 and to stay at 0 and to stay in order so the player cannot just press the numbers(3, 2, 1) randomly. The code I have been using is,
if (Greenfoot.isKeyDown("3"))
{
setImage(new GreenfootImage("2", 18,
Color.WHITE, Color.GREEN));
}
