Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public clsEvaluateHand(clsHand inputHand, clsCommunityCards inputBoard)
        {
            numberOfCards = 2 + inputBoard.NumberOfCommunityCards;
            Card[] convertedHand = convertHand(inputHand, inputBoard);  //converts hand to the Card[] evaluation notation
            Card[] sortedHand    = sortHand(convertedHand);             //sorts the hand


            for (int i = 0; i < numberOfCards; i++)
            {
                handList.Add(sortedHand[i]);
            }

            heartsSum  = 0;
            diamondSum = 0;
            clubSum    = 0;
            spadesSum  = 0;
            cards      = new Card[numberOfCards];
            Cards      = sortedHand;
            handValue  = new HandValue();
        }
Ejemplo n.º 3
0
        //Used to convert the hand from the clsCardDeck notation to clsEvaluateHand notation
        private Card[] convertHand(clsHand inputHand, clsCommunityCards inputBoard)
        {
            //Card[] convertedHand = new Card[numberOfCards];
            Card[] convertedHand = new Card[7];

            //convert cards in hand

            convertedHand[0] = convertCard(inputHand.Card1);
            convertedHand[1] = convertCard(inputHand.Card2);

            convertedHand[2] = convertCard(inputBoard.FirstCard);
            convertedHand[3] = convertCard(inputBoard.SecondCard);
            convertedHand[4] = convertCard(inputBoard.ThirdCard);
            convertedHand[5] = convertCard(inputBoard.FourthCard);
            convertedHand[6] = convertCard(inputBoard.FifthCard);

            //convert cards on board

            return(convertedHand);
        }
Ejemplo n.º 4
0
        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();
        }