예제 #1
0
 public Chand(Card card1, Card card2, Card card3, Card card4, Card card5)
 {
     hand[0] = card1;
     hand[1] = card2;
     hand[2] = card3;
     hand[3] = card4;
     hand[4] = card5;
 }
예제 #2
0
 //constructor. takes an array of 5 cards.
 public Hand(Card[] cards)
 {
     hand = new Card[5];
     for (int i = 0; i < 5; ++i)
     {
         hand[i] = cards[i];
     }
 }
예제 #3
0
 //constructor, takes 5 cards
 public Hand(Card card1, Card card2, Card card3, Card card4, Card card5)
 {
     hand = new Card[5];
     hand[0] = card1;
     hand[1] = card2;
     hand[2] = card3;
     hand[3] = card4;
     hand[4] = card5;
 }
예제 #4
0
파일: Hand.cs 프로젝트: meboz/poker
        public void AddCard(Card card)
        {
            if(card == null)
                throw new ArgumentNullException("card");

            if (Cards == null)
                Cards = new List<Card>();

            Cards.Add(card);
        }
예제 #5
0
파일: Card.cs 프로젝트: meboz/poker
 public bool Equals(Card other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.Suit, Suit) && other.Value == Value;
 }
예제 #6
0
 public Chand(Card[] cards)
 {
     this.hand = cards;
 }