Hello,
I'm teaching myself to do basic Ios programming. I'm working on a project in a book like this:
There is a collection of pictures on one wheel, and then the names for the pictures on the second wheel. The game is to match the picture with the name. It's using the slot-machine like "Picker View" device. The picture set and the name set are each in their own array. Then there is a compare method set up to see if they match.
The problem is that the "randomization" method is very obvious. 0 on wheel-one matches with 9 on wheel-two, 1 with 8, 2 with 7, etc. A person just has to see that the wheels go in opposite directions on the Picker slot machine wheels.
How can I mix the stuff up so it's not so obvious? I don't need it to be different each time. And I don't need it to be done "programmatically" using a sophisticated math equation. Which ever way is simplest to code from a new-to-programming standpoint. It just needs to be scrambled up enough so a person couldn't guess the pattern.
If there is some way to set the arrays up so that they are scrambled more, that would be great. So instead of the pairs being like this 0/9, 1/8, 2/7, 3/6... it would be more like this: 0/4, 1/2, 3/9, 4/3.
That way it's not like "the furthest up on wheel one matches the furthest down one wheel two... the second-furthest up on wheel one matches the second-furthest down on wheel two.
Because that is too obvious.
I would like to read about how to make less-predictable matching patterns on the wheels. Right now, the left-hand wheel displays images, and the right-hand displays text strings. But I could make a set of images for the right-hand wheel instead of using text strings (if that somehow makes it easier to code a better scramble).
I'm teaching myself to do basic Ios programming. I'm working on a project in a book like this:
There is a collection of pictures on one wheel, and then the names for the pictures on the second wheel. The game is to match the picture with the name. It's using the slot-machine like "Picker View" device. The picture set and the name set are each in their own array. Then there is a compare method set up to see if they match.
The problem is that the "randomization" method is very obvious. 0 on wheel-one matches with 9 on wheel-two, 1 with 8, 2 with 7, etc. A person just has to see that the wheels go in opposite directions on the Picker slot machine wheels.
How can I mix the stuff up so it's not so obvious? I don't need it to be different each time. And I don't need it to be done "programmatically" using a sophisticated math equation. Which ever way is simplest to code from a new-to-programming standpoint. It just needs to be scrambled up enough so a person couldn't guess the pattern.
If there is some way to set the arrays up so that they are scrambled more, that would be great. So instead of the pairs being like this 0/9, 1/8, 2/7, 3/6... it would be more like this: 0/4, 1/2, 3/9, 4/3.
That way it's not like "the furthest up on wheel one matches the furthest down one wheel two... the second-furthest up on wheel one matches the second-furthest down on wheel two.
Because that is too obvious.
I would like to read about how to make less-predictable matching patterns on the wheels. Right now, the left-hand wheel displays images, and the right-hand displays text strings. But I could make a set of images for the right-hand wheel instead of using text strings (if that somehow makes it easier to code a better scramble).
Last edited: