Example #1
0
 public void HitPlayer(Player a_player)
 {
     if (m_deck != null && a_player.GetScoreOfHand() < 21)
     {
         Card c = m_deck.GetCard();
         c.Show();
         a_player.DealCard(c);
     }
 }
Example #2
0
 public void HitPlayer(Player a_player)
 {
     if (m_deck != null && a_player.GetScoreOfHand() < 21)
     {
         Card c = m_deck.GetCard();
         c.Show();
         a_player.DealCard(c);
     }
 }
Example #3
0
        public bool IsPlayerWinner(Player a_player)
        {
            int myScore     = GetScoreOfHand();
            int playerScore = a_player.GetScoreOfHand();

            if (playerScore > 21)
            {
                return(false);
            }
            if (myScore > 21)
            {
                return(true);
            }

            if (playerScore >= myScore)
            {
                return(true);
            }

            return(false);
        }
Example #4
0
        public bool IsPlayerWinner(Player a_player)
        {
            int myScore = GetScoreOfHand();
            int playerScore = a_player.GetScoreOfHand();

            if (playerScore > 21)
            {
                return false;
            }
            if (myScore > 21)
            {
                return true;
            }

            if (playerScore >= myScore)
            {
                return true;
            }

            return false;
        }
Example #5
0
 public int GetPlayerScore()
 {
     return(m_player.GetScoreOfHand());
 }