public static Stack <ICard> GenerateDeck() { var colorsForDeck = new List <Color> { Color.Blue, Color.Green, Color.Purple, Color.Red, Color.Yellow }; var deck = new Stack <ICard>(); //create numbered cards foreach (var color in colorsForDeck) { //create numbers 1 through 6 in each color for (int i = 1; i <= 6; i++) { //add 3 of each number to the deck for (int j = 0; j < 3; j++) { var numberedCard = new NumberedCard(i, color); deck.Push(numberedCard); } } } //add 18 Roll Cards var rollCard = new RollCard(); for (int i = 0; i < 18; i++) { deck.Push(rollCard); } return(deck); }
public void AddCard(NumberedCard card) { _cardsInHand.Add(card); }