public clsSeat(int p, int m, int b, clsCharacter c) { _position = p; _money = m; _bet = b; _character = c; _hand = new clsHand(); }
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(); }
//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); }