using System;
using TheGameExtreme.model.card.cardType;

namespace TheGameExtreme.model.deck
{
    public class DizaineDeck : Deck
    {
        public DizaineDeck(int nbCard, decimal borneMin, decimal borneMax) : base(nbCard)
        {
            Random random = new Random();
            int borneMinRandom = (int)(borneMin * 10);
            int borneMaxRandom = (int)(borneMax * 10);
            while (deck.Count < nbCard && deck.Count < (borneMaxRandom - borneMinRandom))
            {
                int value = random.Next(borneMinRandom, borneMaxRandom);
                InsertionDichotomique(deck, 0, deck.Count-1, new FractionCard(new Fraction(value, 10, 2)));
            }
        }
    }
}
