namespace COM3D2.MultipleMaids.Util
{
    internal interface IVoice
    {
        int PickRandomVoice();
    }

    internal struct SingleVoice : IVoice
    {
        private readonly int VoiceID;

        public SingleVoice(int voice)
        {
            VoiceID = voice;
        }

        public int PickRandomVoice()
        {
            return VoiceID;
        }
    }

    internal struct VoiceRange : IVoice
    {
        private static readonly Random rand = new Random();
        private readonly int VoiceStart;
        private readonly int VoiceEnd;

        public VoiceRange(int start, int end)
        {
            VoiceStart = start;
            VoiceEnd = end;
        }

        public int PickRandomVoice()
        {
            return rand.Next(VoiceStart, VoiceEnd + 1);
        }
    }
}
