public override HandEvaluation Evaluate(Hand hand) { if (hand.GroupBy(card => card.Rank).Count() == 2 && hand.First().Rank != hand.Last().Rank) { return(HandEvaluation.FullHouse); } else { return(_next.Evaluate(hand)); } }
protected bool HasStraight(Hand hand) => hand.Distinct().Count() == 5 && hand.Last().Rank - hand.First().Rank == 4;