using System.Collections.Generic;

namespace RebootKit.Engine.Extensions {
    public static class ListEx {
        public static T Random<T>(this IList<T> list) {
            return list.Count == 0 ? default : list[UnityEngine.Random.Range(0, list.Count)];
        }
    }
}