You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
750 B
22 lines
750 B
using System;
|
|
using TheGameExtreme.model.card;
|
|
using TheGameExtreme.model.card.cardType;
|
|
|
|
namespace TheGameExtreme.model.deck
|
|
{
|
|
public class MilliemeDeck : Deck
|
|
{
|
|
public MilliemeDeck(int nbCard, decimal borneMin, decimal borneMax) : base(nbCard)
|
|
{
|
|
Random random = new Random();
|
|
int borneMinRandom = (int)(borneMin * 1000);
|
|
int borneMaxRandom = (int)(borneMax * 1000);
|
|
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, 1000, 4)));
|
|
}
|
|
}
|
|
}
|
|
}
|