I'm new to Unity. I'm developing a card game and could use a little help shuffling the deck without looping through the array(s) more times than necessary.
(using C#) I have this object array populated with my "Card" prefab objects:
Assuming aShoe is populated with objects, how can I return aShoe (randomly) shuffled (plz)?
P.S. Note: Any random will do and thanx in advance.
The "Inside-Out" algorithm listed here should work nicely: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
Alternatively, for a pre-coded C# method, try this (it's a bit less efficient though): http://www.dotnetperls.com/shuffle
answered May 15 '12 at 04:35 PM