I worked further on this.
You need to work with an array because then you have data (the order) to compare the mouse input to.
What to do
Basically in mousePressed() register in which of your 4 screen fields the mouse has been clicked.
- The first time it must be clicked in the field where the first image is located. You need to compare it, and when correct, count it
- The 2nd time it must be clicked in the field where the 2nd image is located. And so on
Setting up a variable makes this easy.
When counting gives 4, the player has won.