using System.Collections.Generic;
using UnityEngine;

public static class ListExtensions
{
    public static T ChooseRandom<T>(this List<T> source)
    {
        if (source.Count == 0)
            return default;
        
        return source[Random.Range(0, source.Count)];
    }
}