I am trying to make a little game and am out of my comfortzone..
I have dutton/switches on input4-8 (normally low) and a 'test button/switch on 10
I have a sequence (normally five) of the buttons to be pressed in a particular (predefined) order to succeed. After pressing their sequence the participant would press the testbutton to be 'evaluated'
The participant should be able to press a sequence less or more then 5 and still be able to press the 'test' button. (but of course fail)
I have a gut feeling this would be a easy task using two arrays and buttonstate but I never used any of them and cant even figure out where to begin. Anyone have some input or example code to get me started?
Mattzzz:
I have a gut feeling this would be a easy task using two arrays and buttonstate but I never used any of them
Have you had a read up on arrays?
If not, its best to start... at the start.
http://www.cplusplus.com/doc/tutorial/
http://www.cplusplus.com/doc/tutorial/arrays/
Otherwise if you have, post what is confusing you.
You don't need the button state, you want the button order... And indeed, you can save this in a array. Life is even easier if you put the buttons in some sort of array as well. And make things reaaaallly easy and use a library (like Bounce2) to do all the heavy lifting for the buttons.
Pseudo code
if(a button is pressed){
add button number to array
howManyButtonsPressed++
}
if(eval pressed)
eval the array to the knows array
}
If you would have complied to forum rules and posted some code of you're own I would have been even that nice to really write to code... Now you have to do with pseudo 
Well for me a programming problem can start before I even write code.. As in this case.
For me the main challenge is that I don't really understand the 'positions' in array. How do I store a buttonpress in the right position/sequence.
I didn't know about that library, will read up on that.
You did get me a bit further, grateful for that 
How do I store a buttonpress in the right position/sequence.
You are going to need a counter for the number of button presses. Septillion has that counter in the pseudo code.
If you start your count at 0 then the button press count number will be the array index.
The button number will be the array value at that index.
When you press the eval button, set the counter back to zero.
Pseudo code
if(a button is pressed){
//add button number to array
myArray[howManyButtonsPressed] = button number
howManyButtonsPressed++
}
if(eval pressed)
eval the array to the knows array
howManyButtonsPressed = 0
}