Esempio n. 1
0
        public void dealNextHand()
        {
            gameDeck.shuffleDeck();     //shuffle the deck
            board.clearCommunityCards();

            clsSeat[] seatArray = new clsSeat[6] {
                seat1, seat2, seat3, seat4, seat5, seat6
            };

            //deal out first card to each player
            for (int i = 0; i < 6; i++) //array size of 6, therefore i < 6 for count control
            {
                seatArray[i].Hand.Card1 = gameDeck.deck[gameDeck.CurrentCard];
                gameDeck.moveToNextCard();
            }

            //deal out second card to each player
            for (int i = 0; i < 6; i++)
            {
                seatArray[i].Hand.Card2 = gameDeck.deck[gameDeck.CurrentCard];
                gameDeck.moveToNextCard();
            }

            //change the test labels to the cards for the player
            lblPlayerCard1.Text = gameDeck.getCardPip(seat1.Hand.Card1);
            lblPlayerCard2.Text = gameDeck.getCardPip(seat1.Hand.Card2);
        }//close dealNextHand() method
Esempio n. 2
0
        private void dealSingleHand()
        {
            //Deal the hand
            gameDeck.shuffleDeck();     //shuffle the deck
            board.clearCommunityCards();

            dealNextHand();
            dealFlop();
            dealTurn();
            dealRiver();
            clsEvaluateHand playerHandEvaluator = new clsEvaluateHand(testSeat.Hand, board);
            HandEnum        playerHandValue     = playerHandEvaluator.EvaluateHand();

            handValue = playerHandValue.ToString();

            int numericHandValue = determineNumbericHandValue(handValue);

            //create and add current hand object to the list
            clsHandEvalTest currentHandList = new clsHandEvalTest(pocketCard1, pocketCard2, boardCard1, boardCard2, boardCard3, boardCard4, boardCard5, handValue, numericHandValue);  //create the hand object

            handsList.Add(currentHandList);
        }