Hey everyone:
Noob here.
I have this Simon game, and the way it is set up now, the "fail" method (if an incorrect circle was pressed) is not initiated until all the circles have been pressed. I want it to initiate as soon as a wrong circle is clicked. (I'm comparing the size - not the individual elements, but my brain is now addled, and I can't figure out a better way to compare).
I created a function called "check_mates" with 2 empty list parameters (list 1, list 2) that returns 1 if the lists are unequal:
If ((size of list)!=(size of list 2))
Return 1
Else: do nothing
Loop (size of list_1) from 0 up to (but not including) size of list 1 incrementing by 1.
If ((item index from list 1)!=(item index from list_2)
Return 1
Else: do nothing
Return 2
Next, I have a method to compare the lists called "world.check_Lists" to compare the variable that stores the moves the program has chosen: "world.program_turn" with the circles clicked by the player ("player_turn") for inequality:
It goes like this:
Do in Order:
If ((world.check_mates list 2 = world.player_turn/list 1=world.program_turn)==1)
world.missed set value to true
world.fail (method to display fail text initiated)
ELSE:
world.main
Can anyone tell from this code where I went wrong? I am a green noob; this is the first game I've ever made, and my head is swimming in variables.
Any advice as to what the problem might be would be greatly appreciated. I'm pretty sure it has something to do with looping the size of list 1 in my function - but this has turned out to be way more complex than I had planned, and my mind is so muddled at this point - that I'm probably missing something obvious.
Thanks in advance. If this wasn't clear, I'd be happy to explain it more fully.
Take care and good cheer,
Todd