//compare two player hands
        public int compareFaceValue(Hand hand)
        {
            BlackJackHand otherHand = hand as BlackJackHand;

            if (hand != null)
            {
                return(this.getSumOfCards().CompareTo(otherHand.getSumOfCards()));
            }
            return(0);
        }
        public bool isTied(BlackJackHand otherHand)
        {
            int sum = getSumOfCards();

            if (sum == otherHand.getSumOfCards())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
 public BlackJackPlayer(string name)
 {
     this.Name = name;
     this.hand = new BlackJackHand();
 }
Beispiel #4
0
 public BlackJackPlayer()
 {
     this.hand = new BlackJackHand();
 }