OK, here goes...attempting to build a game similar to Boggle...where there are 16 cubes (6 sides, of course on each, with various Letters on each side).
To start a 'round', I want to randomly select each cube, and then randomly select a side (letter). I currently have 16 listboxes with the letters found on a normal Boggles game (16 dice), with the 6 letters on each in the listboxes. (see image). Using the Rnd() function, I can randomly select one of the 16 listboxes, and then randomly select one of the letters as shown in each listbox, and place that letter in the first of 16 textboxes (currently have 4 arrays of textboxes (text1(1 through 4), text2(1 through 4), etc)).
My issue is how to not select any one of the listboxes twice when setting up a round.
In the example image, you see the "N" in the fourth listbox (list1(3)) being set for the first text in text1(1).
This image was captured after this simple code (to fill the first of 16 textboxes): (variables are declared outside of sub)
Image may be NSFW.
Clik here to view.
To start a 'round', I want to randomly select each cube, and then randomly select a side (letter). I currently have 16 listboxes with the letters found on a normal Boggles game (16 dice), with the 6 letters on each in the listboxes. (see image). Using the Rnd() function, I can randomly select one of the 16 listboxes, and then randomly select one of the letters as shown in each listbox, and place that letter in the first of 16 textboxes (currently have 4 arrays of textboxes (text1(1 through 4), text2(1 through 4), etc)).
My issue is how to not select any one of the listboxes twice when setting up a round.
In the example image, you see the "N" in the fourth listbox (list1(3)) being set for the first text in text1(1).
This image was captured after this simple code (to fill the first of 16 textboxes): (variables are declared outside of sub)
Code:
dieNumber = Int((16 * Rnd) + 1)
iLetter = Int(6 * Rnd) + 1
List1(dieNumber - 1).ListIndex = iLetter - 1
Text1(1).Text = List1(dieNumber - 1).Text
Clik here to view.
