コード例 #1
0
        public void Hit(Card card, int newColumn, int row)
        {
            AddCard(card, newColumn, row, player);

            string playerTotal = string.Format("PLAYER's HAND ({0}):", playerCardtotal);

            DrawCard.WriteAt(playerTotal, 2, 2);

            //Check if player bust.
            Evaluations.PlayerBust(playerCardtotal, dealerCardTotal);
            //Check if blackjack.
            Evaluations.BlackJack(playerCardtotal, dealerCardTotal);
        }
コード例 #2
0
        public void RevealDownCard()
        {
            string suit          = DrawCard.FormatCard(downCard.CardSuit);
            string cardValue     = string.Format("{0} {1}", suit, downCard.CardRank);
            int    downCardValue = (int)Enum.Parse(typeof(Card.Rank), Enum.GetName(typeof(Card.Rank), downCard.CardRank));

            dealerCardTotal = firstCardTotal + downCardValue;

            string dealer = string.Format("DEALER's HAND ({0}):", dealerCardTotal);

            DrawCard.WriteAt(dealer, 2, 14);
            DrawCard.WriteAt(cardValue, 16, 17);

            //Check if dealer had a blackjack.
            Evaluations.BlackJack(playerCardtotal, dealerCardTotal);
        }