public void FlushOverStraight_Test() { List <CompleteCardData> testCommons = new List <CompleteCardData>() { Cards.ACE_CLUBS, Cards.FIVE_CLUBS, Cards.QUEEN_CLUBS, Cards.TEN_CLUBS, Cards.NINE_DIAMONDS }; gameRulesInstance.AnalyzeCommons(testCommons); List <CompleteCardData> testHand = new List <CompleteCardData>() { Cards.JACK_CLUBS, Cards.KING_SPADES }; PokerGameRules.Result res = gameRulesInstance.AnalyzeHandWithCommons(testHand); Assert.IsTrue(res.pattern == PokerGameRules.Pattern.Flush); Assert.IsTrue(res.strengthValue == Cards.ACE_CLUBS.StrengthValue); }
public void RoyalFlushOnly_Test() { // Setup List <CompleteCardData> testCommons = new List <CompleteCardData>() { Cards.ACE_CLUBS, Cards.FIVE_CLUBS, Cards.QUEEN_CLUBS, Cards.TEN_CLUBS, Cards.NINE_DIAMONDS }; gameRulesInstance.AnalyzeCommons(testCommons); List <CompleteCardData> testHand = new List <CompleteCardData>() { Cards.JACK_CLUBS, Cards.KING_CLUBS }; PokerGameRules.Result res = gameRulesInstance.AnalyzeHandWithCommons(testHand); Assert.IsTrue(res.pattern == PokerGameRules.Pattern.RoyalFlush); }
public void HighCard_Test() { // Setup List <CompleteCardData> testCommons = new List <CompleteCardData>() { Cards.ACE_CLUBS, Cards.KING_CLUBS, Cards.QUEEN_HEARTS, Cards.TEN_SPADES, Cards.NINE_CLUBS }; gameRulesInstance.AnalyzeCommons(testCommons); List <CompleteCardData> testHand = new List <CompleteCardData>() { Cards.EIGHT_CLUBS, Cards.THREE_DIAMONDS }; PokerGameRules.Result res = gameRulesInstance.AnalyzeHandWithCommons(testHand); Assert.IsTrue(res.pattern == PokerGameRules.Pattern.None); Assert.IsTrue(res.strengthValue == Cards.ACE_CLUBS.StrengthValue); }
public void FullHouseOverStraight_Test() { // Setup List <CompleteCardData> testCommons = new List <CompleteCardData>() { Cards.ACE_CLUBS, Cards.KING_CLUBS, Cards.QUEEN_HEARTS, Cards.TEN_CLUBS, Cards.TEN_DIAMONDS }; gameRulesInstance.AnalyzeCommons(testCommons); List <CompleteCardData> testHand = new List <CompleteCardData>() { Cards.ACE_DIAMONDS, Cards.ACE_HEARTS, Cards.JACK_DIAMONDS }; PokerGameRules.Result res = gameRulesInstance.AnalyzeHandWithCommons(testHand); Assert.IsTrue(res.pattern == PokerGameRules.Pattern.FullHouse); Assert.IsTrue(res.strengthValue == Cards.ACE_CLUBS.StrengthValue); }
public void StraightFlushHighOverStraightHigh_Test() { // Setup List <CompleteCardData> testCommons = new List <CompleteCardData>() { Cards.TWO_DIAMONDS, Cards.EIGHT_CLUBS, Cards.QUEEN_CLUBS, Cards.TEN_CLUBS, Cards.NINE_CLUBS }; gameRulesInstance.AnalyzeCommons(testCommons); List <CompleteCardData> testHand = new List <CompleteCardData>() { Cards.JACK_CLUBS, Cards.KING_HEARTS }; PokerGameRules.Result res = gameRulesInstance.AnalyzeHandWithCommons(testHand); Assert.IsTrue(res.pattern == PokerGameRules.Pattern.StraightFlush); Assert.IsTrue(res.strengthValue == Cards.QUEEN_CLUBS.StrengthValue); }
public void StraightFlushOnlyAceLow_Test() { // Setup List <CompleteCardData> testCommons = new List <CompleteCardData>() { Cards.ACE_DIAMONDS, Cards.TWO_DIAMONDS, Cards.THREE_DIAMONDS, Cards.FOUR_DIAMONDS, Cards.NINE_CLUBS }; gameRulesInstance.AnalyzeCommons(testCommons); List <CompleteCardData> testHand = new List <CompleteCardData>() { Cards.JACK_CLUBS, Cards.FIVE_DIAMONDS }; PokerGameRules.Result res = gameRulesInstance.AnalyzeHandWithCommons(testHand); Assert.IsTrue(res.pattern == PokerGameRules.Pattern.StraightFlush); Assert.IsTrue(res.strengthValue == Cards.FIVE_DIAMONDS.StrengthValue); }
public void StraightOnlyWithAcesHigh_Test() { // Setup List <CompleteCardData> testCommons = new List <CompleteCardData>() { Cards.ACE_CLUBS, Cards.FIVE_CLUBS, Cards.QUEEN_DIAMONDS, Cards.TEN_SPADES, Cards.NINE_DIAMONDS }; gameRulesInstance.AnalyzeCommons(testCommons); List <CompleteCardData> testHand = new List <CompleteCardData>() { Cards.JACK_CLUBS, Cards.KING_HEARTS }; PokerGameRules.Result res = gameRulesInstance.AnalyzeHandWithCommons(testHand); Assert.IsTrue(res.pattern == PokerGameRules.Pattern.Straight); Assert.IsTrue(res.strengthValue == Cards.ACE_CLUBS.StrengthValue); }