The old deck shuffle problem.
Two methods are available...
In one method: generate randoms based on current list size and remove the item from the list and pop it onto the randomized list. For this you need to have the original list in a collapsing array.
The other method uses a hit list. To make this easy you need to create the hit list as a sorted list making a binary search easy to implement.
Hope this helps.
B-)
Another method comes to mind. Split the original list into two equal lists, and pop n (where n is 1-3 and not greater than the remaining items in a list) items from the top of alternating lists onto the new randomized list until both lists are exhausted. Repeat the process 10 to 20 times. No searches, no collapsing arrays. Just push, pop, and arrays.
Wil Mead
wmead@optonline.net