zoveelstebiker
New member
- Joined
- Nov 11, 2007
- Messages
- 3
- Programming Experience
- Beginner
I need to create an array of random values, with values between 1 and 26.All values have to be used,but there should be no duplicates
example the first time the code should give this : (3,7,8,23,11,4,21,...)
and the next time te form loads : (3,5,8,9,22,11,26,1,4,18,....)
So an array that contains all integer Values between 1 and 26 , with no duplicates.
then i want to use this values as index for a array with money ammounts so that every time my amounts are at a "different" place.This is for a "deal or no deal game".
my try is :
this code selects a random element of my array with amounts but how do i repeat this or store it in a new array ? im a complete newbie at vb.net and any help is gratefully accepted ! i know that there is a old topic about a deal or no deal game but i can't figure it out with that example.
regards !
example the first time the code should give this : (3,7,8,23,11,4,21,...)
and the next time te form loads : (3,5,8,9,22,11,26,1,4,18,....)
So an array that contains all integer Values between 1 and 26 , with no duplicates.
then i want to use this values as index for a array with money ammounts so that every time my amounts are at a "different" place.This is for a "deal or no deal game".
my try is :
VB.NET:
For i = 0 To 25
will = willekeurig.Next(i, 26)
hulp = bedragen(i)
bedragen(i) = bedragen(will)
bedragen(will) = hulp
Label3.Text = will
Next i
this code selects a random element of my array with amounts but how do i repeat this or store it in a new array ? im a complete newbie at vb.net and any help is gratefully accepted ! i know that there is a old topic about a deal or no deal game but i can't figure it out with that example.
regards !
Last edited: