public override void Check(CheckerHelper helper, Hand hand) { if (helper.HasNOfAKind(hand, 4)) { Console.WriteLine("Four of a kind!"); } else { this.SuccessiveCombinationChecker.Check(helper, hand); } }
public override void Check(CheckerHelper helper, Hand hand) { if (helper.HasNOfAKind(hand, 2) && helper.HasNRankGroups(hand, 3)) { Console.WriteLine("Two pairs!"); } else { this.SuccessiveCombinationChecker.Check(helper, hand); } }
public override void Check(CheckerHelper helper, Hand hand) { if (helper.HasNOfAKind(hand, 3) && helper.HasNOfAKind(hand, 2)) { Console.WriteLine("Full house!"); } else { this.SuccessiveCombinationChecker.Check(helper, hand); } }
public override void Check(CheckerHelper helper, Hand hand) { if (helper.IsStraight(hand)) { Console.WriteLine("Straight!"); } else { this.SuccessiveCombinationChecker.Check(helper, hand); } }
public override void Check(CheckerHelper helper, Hand hand) { if (helper.IsFlush(hand)) { Console.WriteLine("Flush!"); } else { this.SuccessiveCombinationChecker.Check(helper, hand); } }
public override void Check(CheckerHelper helper, Hand hand) { if (!helper.IsValidHand(hand)) { Console.WriteLine("Invalid hand."); return; } if (helper.IsFlush(hand) && helper.IsStraight(hand)) { Console.WriteLine("Straight flush!"); } else { this.SuccessiveCombinationChecker.Check(helper, hand); } }
public abstract void Check(CheckerHelper helper, Hand hand);
public override void Check(CheckerHelper helper, Hand hand) { Console.WriteLine("High card!"); }