Re: Randomisation of array order

2015-08-02 Thread cym13 via Digitalmars-d-learn
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

Re: Randomisation of array order

2015-08-02 Thread Matt via Digitalmars-d-learn
...And then I realised that I hadn't looked inside std.random. Question solved, because I am a dumbass.

Randomisation of array order

2015-08-02 Thread Matt via Digitalmars-d-learn
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