private void frmHandEvalTest_Load(object sender, EventArgs e) { gameDeck = new clsCardDeck(); //instantiate the deck gameDeck.shuffleDeck(); //shuffle it for the first time board = new clsCommunityCards(); }
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
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); }
private void PokerGame_Load(object sender, EventArgs e) { startNextHand = false; lblSeat1Name.Text = seat1.Character.Name; lblSeat1Status.Text = "Waiting for game to start."; lblMoneySeat1.Text = seat1.Money.ToString(); picSeat1.Image = seat1.Character.Picture; lblSeat2Name.Text = seat2.Character.Name; lblSeat2Status.Text = "Waiting for game to start."; lblMoneySeat2.Text = seat2.Money.ToString(); picSeat2.Image = seat2.Character.Picture; lblSeat3Name.Text = seat3.Character.Name; lblSeat3Status.Text = "Waiting for game to start."; lblMoneySeat3.Text = seat3.Money.ToString(); picSeat3.Image = seat3.Character.Picture; lblSeat4Name.Text = seat4.Character.Name; lblSeat4Status.Text = "Waiting for game to start."; lblMoneySeat4.Text = seat4.Money.ToString(); picSeat4.Image = seat4.Character.Picture; lblSeat5Name.Text = seat5.Character.Name; lblSeat5Status.Text = "Waiting for game to start."; lblMoneySeat5.Text = seat5.Money.ToString(); picSeat5.Image = seat5.Character.Picture; lblSeat6Name.Text = seat6.Character.Name; lblSeat6Status.Text = "Waiting for game to start."; lblMoneySeat6.Text = seat6.Money.ToString(); picSeat6.Image = seat6.Character.Picture; gameDeck = new clsCardDeck(); //instantiate the deck gameDeck.shuffleDeck(); //shuffle it for the first time board = new clsCommunityCards(); }