tahu191
Well-known member
I am trying to create a method that "shuffles" around the elements in an array of images, here is what i have now:
What it does is take random elements from the original array and assign them to a temporary one. Then when all of them are done it assigns them back to the real array. It isn't working 100%
VB.NET:
Dim i1(32) As Bitmap
Dim count As Integer = 32
Do
Dim a As Integer = Rnd() * count
Dim i As Image = images1(a)
If i.Equals(Nothing) = False Then
i1((32) - count) = i
count -= 1
End If
Loop While count > 0
For x As Integer = 0 To i1.Length - 1
images1(x) = i1(x)
Next
What it does is take random elements from the original array and assign them to a temporary one. Then when all of them are done it assigns them back to the real array. It isn't working 100%