public TwoPairHand(int pairHigh, int pairLow, int kicker, OrderedCardSet cards) { CardSet = cards; PairHigh = pairHigh; PairLow = pairLow; Kicker = kicker; }
public ThreeKindHand(int threeCard, int kickerHigh, int kickerLow, OrderedCardSet cards) { CardSet = cards; ThreeCard = threeCard; KickerLow = kickerLow; KickerHigh = KickerHigh; }
private void revealCommunityrCards(OrderedCardSet set) { writeCard(ComCard1Label, set[0]); writeCard(ComCard2Label, set[1]); writeCard(ComCard3Label, set[2]); writeCard(ComCard4Label, set[3]); writeCard(ComCard5Label, set[4]); }
public OnePairHand(int pair, int kickerHigh, int kickerMed, int kickerLow, OrderedCardSet cards) { CardSet = cards; Pair = pair; KickerHigh = kickerHigh; KickerMed = kickerMed; KickerLow = kickerLow; }
private PokerHand GetHand(PlayingCard one, PlayingCard two, PlayingCard three, PlayingCard four, PlayingCard five) { OrderedCardSet cards = new OrderedCardSet(new List <PlayingCard> { one, two, three, four, five }); PokerHand hand = HoldemHand.IdentitfyHand(cards); return(hand); }
public int CompareTo([AllowNull] PokerHand other) { if (other == null) { return(1); } else { int compare = PokerHand.compareHandRank(this, other); if (compare == 0) { FlushHand otherHand = other as FlushHand; if (other == null) { throw new ArgumentException("Not valid hand"); } OrderedCardSet self = CardSet; OrderedCardSet outter = otherHand.CardSet; for (int high = CardSet.Count - 1; high >= 0; high -= 1) { PlayingCard first = self.asList()[high]; PlayingCard second = outter.asList()[high]; compare = first.CompareTo(second); if (compare != 0) { return(compare); } } return(0); } else { return(compare); } } }
public FourKindHand(int fourCardRank, int kicker, OrderedCardSet cards) { CardSet = cards; FourCardRank = fourCardRank; Kicker = kicker; }
public StraightFlushHand(int rank, PlayingCard.Suit suit, OrderedCardSet cards) { CardSet = cards; CardRank = rank; CardSuit = suit; }
public FlushHand(PlayingCard.Suit suit, OrderedCardSet cards) { CardSuit = suit; CardSet = cards; }
public HighCardHand(OrderedCardSet cards) { CardSet = cards; }
private void revealPlayerCards(OrderedCardSet set) { writeCard(PlayerCard1Label, set[0]); writeCard(PlayerCard2Label, set[1]); }
private void revealCpuCards(OrderedCardSet set) { writeCard(OpCard1Label, set[0]); writeCard(OpCard2Label, set[1]); }
public StraightHand(int rank, OrderedCardSet cards) { CardSet = cards; CardRank = rank; }
public FullHouseHand(int trippleHigh, int pairLow, OrderedCardSet cards) { CardSet = cards; TripleHigh = trippleHigh; PairLow = pairLow; }