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.
50 lines
1.3 KiB
50 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using TheGameExtreme.model.card;
|
|
|
|
namespace TheGameExtreme.model.deck
|
|
{
|
|
public class ExtremeDeck : Deck
|
|
{
|
|
public ExtremeDeck()
|
|
{
|
|
Random random = new Random();
|
|
List<int> endGame = new List<int>();
|
|
while (endGame.Count < 4)
|
|
{
|
|
int r = random.Next(2, 99);
|
|
if (!endGame.Contains(r))
|
|
{
|
|
endGame.Add(r);
|
|
}
|
|
}
|
|
List<int> threeCard = new List<int>();
|
|
while (threeCard.Count < 4)
|
|
{
|
|
int r = random.Next(2, 99);
|
|
if (!endGame.Contains(r) && !threeCard.Contains(r))
|
|
{
|
|
threeCard.Add(r);
|
|
}
|
|
}
|
|
Card card;
|
|
for (int i = 2; i <= 99; i++)
|
|
{
|
|
if (endGame.Contains(i))
|
|
{
|
|
card = new EndGameCard(i);
|
|
}
|
|
else if (threeCard.Contains(i))
|
|
{
|
|
card = new ThreeCard(i);
|
|
}
|
|
else
|
|
{
|
|
card = new ClassicCard(i);
|
|
}
|
|
deck.Add(card);
|
|
}
|
|
}
|
|
}
|
|
}
|