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.
19 lines
547 B
19 lines
547 B
using System;
|
|
using TheGameExtreme.model.card.cardType;
|
|
|
|
namespace TheGameExtreme.model.deck
|
|
{
|
|
public class RelativeDeck : Deck
|
|
{
|
|
public RelativeDeck(int nbCard, int borneMin, int borneMax) : base(nbCard)
|
|
{
|
|
Random random = new Random();
|
|
while (deck.Count < nbCard && deck.Count < (borneMax - borneMin))
|
|
{
|
|
int value = random.Next(borneMin, borneMax);
|
|
InsertionDichotomique(deck, 0, deck.Count-1, new ClassicCard(value));
|
|
}
|
|
}
|
|
}
|
|
}
|