public static void Fight(CardDeck player1Deck, CardDeck player2Deck)
        {
            // Define needed variables
            List <Card> _cards = new List <Card>();

            _cards.Add(player1Deck.Deck.ElementAt(0));
            _cards.Add(player2Deck.Deck.ElementAt(0));

            // Add cards from round to bottom of winners deck
            if (_cards.ElementAt(0).Rank > _cards.ElementAt(1).Rank)
            {
                CardDeck.MoveCards(player1Deck, player2Deck, _cards);
            }
            else
            {
                CardDeck.MoveCards(player2Deck, player1Deck, _cards);
            }
        }
Ejemplo n.º 2
0
        public static void War(CardDeck player1Deck, CardDeck player2Deck)
        {
            // Determine how many wars, ie Double, Triple, etc...
            int wars = WarRound.HowManyCards(player1Deck, player2Deck);

            // Define cards to print
            List <Card> _cards = new List <Card>();

            for (int i = 0; i < (wars * 4 + 1); i++)
            {
                _cards.Add(player1Deck.Deck.ElementAt(i));
                _cards.Add(player2Deck.Deck.ElementAt(i));
            }

            // Add cards from round to bottom of winners deck
            if (_cards.ElementAt(8 * wars).Rank > _cards.ElementAt(8 * wars + 1).Rank)
            {
                CardDeck.MoveCards(player1Deck, player2Deck, _cards);
            }
            else if (_cards.ElementAt(8 * wars).Rank < _cards.ElementAt(8 * wars + 1).Rank)
            {
                CardDeck.MoveCards(player2Deck, player1Deck, _cards);
            }
        }