//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);
            }
        }
示例#3
0
 public BlackJackPlayer(string name)
 {
     this.Name = name;
     this.hand = new BlackJackHand();
 }
示例#4
0
 public BlackJackPlayer()
 {
     this.hand = new BlackJackHand();
 }