#393

New

New shuffle functionality

Reported by Todd Clark on OCTGN · 23/05/2011 16:51:27

Assigned to:
jods
Priority:
Normal
Status:
New
Category:
None
Version:
0.9.*
Issue type:
Feature

I, as well as some other users, have had to shuffle numerous(> 10) times to get a half way decent distribution of cards in the library. Most times, the cards are “chunking”, for lack of a better word, together. I have no idea what type of algorithm is being used, but one solution could be:

1: Assign UNIQUE values to each element/key in the data structure. These would be generate with a random function seeded with nanoseconds/cpu-clock/whatever
2: Sort by the assigned values with whatever is in your standard lib
3: Maybe run this multiple times per shuffle?

- Point being, it should only need to be called once… assuming it will represent the user genuinely shuffling their deck as they would in the real word(multiple times)

Attachments

No attachment has been uploaded, yet.


Loading comments...