public override int CompareToSuitedHand(SuitedHandBase other) { var otherHighCard = other as Flush; if (otherHighCard == null) { return(HandRank.CompareTo(other.HandRank)); } if (Card1 != otherHighCard.Card1) { return(Card1.CompareTo(otherHighCard.Card1)); } if (Card2 != otherHighCard.Card2) { return(Card2.CompareTo(otherHighCard.Card2)); } if (Card3 != otherHighCard.Card3) { return(Card3.CompareTo(otherHighCard.Card3)); } if (Card4 != otherHighCard.Card4) { return(Card4.CompareTo(otherHighCard.Card4)); } return(Card5.CompareTo(otherHighCard.Card5)); }
public override int CompareToSuitedHand(SuitedHandBase other) { var otherRoyalFlush = other as RoyalFlush; if (otherRoyalFlush == null) { return(HandRank.CompareTo(other.HandRank)); } return(0); }
public override int CompareToSuitedHand(SuitedHandBase other) { var otherStraightFlush = other as StraightFlush; if (otherStraightFlush == null) { return(HandRank.CompareTo(other.HandRank)); } return(TopRank.CompareTo(otherStraightFlush.TopRank)); }