示例#1
0
 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));
     }
 }
示例#2
0
 protected bool HasStraight(Hand hand) =>
 hand.Distinct().Count() == 5 &&
 hand.Last().Rank - hand.First().Rank == 4;