using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Assets
{
    public static class ArrayUtilities
    {
        public static T GetRandomItem<T>(List<T> items)
        {
            var index = UnityEngine.Random.Range(0, items.Count);
            return items[index];
        }

        public static List<T> GetRandomSubset<T>(List<T> items, int count)
        {
            return items.OrderBy(x => Guid.NewGuid()).Take(count).ToList();
        }
    }
}
