Hi all. I've been working on a simple memory palace/recall game to practice using arrays. Problem is, I'm stuck and can't seem to figure out how to get unstuck. As always I'm probably overlooking something basic, but I could use a nudge in the right direction.
Here's the basic flow of the game:
1. Tap the screen and a random icon appears. Repeat several times.
2. When a certain number of icons have been seen, go to the quiz screen.
3. Quiz screen shows a grid of all the icons. User must tap to select the icons he or she saw in the previous screen.
4. After the quiz screen, correct guesses will be added to an array for permanent storage.
5. Next round is the same as the first, only now the icons that are shown do not repeat icons the user has correctly guessed.
(.capx file to see the in-progress example. Ignore the incomplete sections, just stay on main-sheet)
I've been using two arrays in my attempt to accomplish the last task:
- Array1 (aIconPool) holds randomized numbers used to spawn icons.
- Array2 (aSaved) holds a record of the correctly guessed icons.
The idea is to subtract the contents of the second array from the contents of the first. My problem is I can't find a way to do this. The events pictured below do something similar, but incorrect:
So, what's wrong with the above setup? I've tried various permutations of event ordering and nesting, but they're just as broken.
Also, if my entire approach is too convoluted, feel free to tell me as such.
Thanks!