2010-12-15, 01:40 AM
Hey guys,
I'm still new to Visual Basic, and I just completed a Memory game. The only problem is that the values of the cards never change, since they are in a static array.
I've heard of a Fisher Yates shuffle that should do exactly what I want (randomize my fixed list), however I don't know how to implement it.
Here's what I have to assign values:
Cards(0) = 60
Cards(1) = 37
Cards(2) = 84
Cards(3) = 23
Cards(4) = 19
Cards(5) = 95
Cards(6) = 37
Cards(7) = 60
Cards(8) = 84
Cards(9) = 19
Cards(10) = 23
Cards(11) = 95
I'm still new to Visual Basic, and I just completed a Memory game. The only problem is that the values of the cards never change, since they are in a static array.
I've heard of a Fisher Yates shuffle that should do exactly what I want (randomize my fixed list), however I don't know how to implement it.
Here's what I have to assign values:
Cards(0) = 60
Cards(1) = 37
Cards(2) = 84
Cards(3) = 23
Cards(4) = 19
Cards(5) = 95
Cards(6) = 37
Cards(7) = 60
Cards(8) = 84
Cards(9) = 19
Cards(10) = 23
Cards(11) = 95