Randomisation of array order

Matt via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 2 02:24:10 PDT 2015


I was planning to use a dynamic array of indices to represent a 
deck of cards, and was wondering if there was any easy way to 
"shuffle" the arrays contents? I checked the library docs, but 
came to the conclusion that sorting arrays is a much more common 
operation :)

If anyone has a suggestion on a good way to implement this, I'd 
appreciate it. I don't need you to code it for me ( although I 
wouldn't turn it down if you've already done it), just a 
suggestion of what to do would be appreciated


More information about the Digitalmars-d-learn mailing list