public override void Evaluate(PokerHand hand) { var patternMatcher = new PatternMatcher(); var multipleMatcher = new MultipleMatcher(); multipleMatcher.Evaluate(hand); patternMatcher.Evaluate(hand); }
public void GivenAMultiple_WhenValueIsTHreTwo_ThenFullHouseIsReturned() { var hand = new PokerHandTestBuilder() .WithFullHouse() .Build(); var multipleMatcher = new MultipleMatcher(); multipleMatcher.Evaluate(hand); Assert.That(hand.Rank, Is.EqualTo(HandRank.FullHouse)); }
public void GivenAMultiple_WhenValueIsTwoTwo_Then2PairIsReturned() { var hand = new PokerHandTestBuilder() .With2Pair() .Build(); var multipleMatcher = new MultipleMatcher(); multipleMatcher.Evaluate(hand); Assert.That(hand.Rank, Is.EqualTo(HandRank.TwoPair)); }
public void GivenAMultiple_WhenValueIsFour_Then4OfAKindIsReturned() { var hand = new PokerHandTestBuilder() .With4OfAKind() .Build(); var multipleMatcher = new MultipleMatcher(); multipleMatcher.Evaluate(hand); Assert.That(hand.Rank, Is.EqualTo(HandRank.FourKind)); }