コード例 #1
0
        //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);
        }
コード例 #2
0
        public bool isTied(BlackJackHand otherHand)
        {
            int sum = getSumOfCards();

            if (sum == otherHand.getSumOfCards())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }