public bool HasThisHand(Hand hand) { var x = from c in hand.Cards where c.Suit != hand.Cards[0].Suit select c; if (x.Count() > 0) return false; return true; }
public bool HasThisHand(Hand hand) { ThreeOfAKind threeOfAKind = new ThreeOfAKind(); OnePair onePair = new OnePair(); return threeOfAKind.HasThisHand(hand) && onePair.HasThisHand(hand); }
public bool HasThisHand(Hand hand) { int pairCount = 0; foreach (Faces face in hand.Histogram.Keys) { if (hand.Histogram[face] == 2) pairCount++; } return pairCount == 2; }
public bool HasThisHand(Hand hand) { foreach (Faces face in hand.Histogram.Keys) { if (hand.Histogram[face] == 3) return true; } return false; }
public bool HasThisHand(Hand hand) { Flush flush = new Flush(); Straight straight = new Straight(); return flush.HasThisHand(hand) && straight.HasThisHand(hand); }
public bool HasThisHand(Hand hand) { if (hand.Cards[0].Face == hand.Cards[1].Face - 1 && hand.Cards[1].Face == hand.Cards[2].Face - 1 && hand.Cards[2].Face == hand.Cards[3].Face - 1 && hand.Cards[3].Face == hand.Cards[4].Face - 1) { return true; } return false; }