On Sunday, 2 August 2015 at 09:24:12 UTC, Matt wrote:
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
...And then I realised that I hadn't looked inside std.random.
Question solved, because I am a dumbass.
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