Beispiel #1
0
        /// <summary>
        /// Adds a card to the top of the hand, making sure the card is face down
        /// </summary>
        /// <param name="card">the card to add</param>
        public void AddCard(Card card)
        {
            if (card.FaceUp)
            {
                card.FlipOver();
            }
            cards.Add(card);

            // move the card to the hand location
            card.X = x;
            card.Y = y;
        }
Beispiel #2
0
        /// <summary>
        /// Adds the cards from the given War battle pile to the bottom of the hand
        /// </summary>
        /// <param name="warBattlePile">the War battle pile to add</param>
        public void AddCards(WarBattlePile warBattlePile)
        {
            // add all the cards
            while (!warBattlePile.Empty)
            {
                Card card = warBattlePile.TakeTopCard();
                if (card.FaceUp)
                {
                    card.FlipOver();
                }
                cards.Insert(0, card);

                // move the card to the hand location
                card.X = x;
                card.Y = y;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Adds a card to the top of the hand, making sure the card is face down
        /// </summary>
        /// <param name="card">the card to add</param>
        public void AddCard(Card card)
        {
            if (card.FaceUp)
            {
                card.FlipOver();
            }
            cards.Add(card);

            // move the card to the hand location
            card.X = x;
            card.Y = y;
        }