Hi Consuelos,
So, I'll be up front and say I didn't look too deeply at your code---you might have been on to something. The fact that I solved it differently doesn't invalidate your efforts.
When dealing with mouse clicks, there is a complication because the sampling rate is really fast. So, a single behavioral "click" ends up returning a ton of .getPressed() events to the program. One way to handle this is manually impose a sampling rate. Don't treat another response as valid until some time has elapsed. You could also code up a "gating" function, so that if getPressed()==True, the gate closes until getPressed() == False... but I didn't want to think that through right now. Or I guess you could check for pairs of press events, and require that the first be False and the second True...
Anyway, you need to define a click. That's probably the hardest part.
Then, if I understand correctly, you need to check for sequences of three "clicks" that follow a pattern. You can do this by appending to a list, as it looks like you were thinking about. What I did in the linked code was to wait until I collected n clicks, and then check to see if that matched the goal sequence. If not, I deleted the first element of the list and collected another response (appended to the end). Then I check the new set of n, and I do that until the sequence is discovered.
I might have gone a little overboard with the "minimum working example", but the way I thought about the solution suggested that defining the experiment as a class would make things easier. It's not absolutely necessary. Sometimes it makes things a little more intuitive.
HTH!
Chris