using System;

namespace skyscraper5.Skyscraper
{
	internal static class ArrayExtensions
	{
		public static void Shuffle<T>(this T[] collection)
		{
			Random rng = new Random();
			for (int i = 0; i < collection.Length; i++)
			{
				int lOffset = rng.Next(collection.Length);
				int rOffset = rng.Next(collection.Length);
				(collection[lOffset], collection[rOffset]) = (collection[rOffset], collection[lOffset]);
			}
		}
	}
}
