예제 #1
0
        public override void add(Card card)
        {            
            if (_cards.Count() != 1)
                card.show();

            base._cards.Add(card);         
        }      
예제 #2
0
        public void initialize()
        {
            _cards_in_deck = new List<DeckPosition>();
            var cards = new List<Card>();
            int current = 0;

            for (int y = 0; y < 4; y++)
            {
                for (int x = 1; x < 14; x++)
                {
                    var suit = (Suit)y;
                    var card_value = (CardValue)x;

                    var card = new Card(suit, card_value);

                    cards.Add(card);
                }
            }

            int position_in_deck = 1;

            foreach (var card in cards)
            {
                _cards_in_deck.Add(new DeckPosition() { card = card, position_in_pack = position_in_deck });

                position_in_deck++;
            }
        }
예제 #3
0
 public abstract void add(Card card);
예제 #4
0
 private void remove(Card card)
 {
     this._cards.Remove(card);
 }
예제 #5
0
 public override void add(Card card)
 {
     card.show();
     base._cards.Add(card);                                    
 }        
예제 #6
0
 public bool Equals(Card other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.suit, suit) && Equals(other.card_value, card_value);
 }