Easiest way I can think would be to make a Global boolean - this will track either true or false and you will toggle this each time the correct button is clicked, and use it to verify the correct button is picked.
This code will move a sprite up slowly if you click left then right then left..
left left left - will only move it once on the first left click
right right right - wont move it.