public void Pair_should_beat_high_card_only() { var hand1 = new PokerHand("2D 2C"); var hand2 = new PokerHand("AA 2H"); hand1.Beats(hand2).ShouldBeTrue(); hand2.Beats(hand1).ShouldBeFalse(); }
public void Pair_should_beat_higher_pair() { var hand1 = new PokerHand("AC 2D 2C"); var hand2 = new PokerHand("2H 3A 3H"); hand1.Beats(hand2).ShouldBeFalse(); hand2.Beats(hand1).ShouldBeTrue(); }
public void Equal_pairs_should_use_high_card_to_determine_winner() { var hand1 = new PokerHand("2D 2C AC KC TD"); var hand2 = new PokerHand("2H 2S AD KC 9C"); hand1.Beats(hand2).ShouldBeTrue(); hand2.Beats(hand1).ShouldBeFalse(); }
public void Beats_should_use_first_unlike_highest_card(string bestHand, string worstHand) { var hand1 = new PokerHand(bestHand); var hand2 = new PokerHand(worstHand); hand1.Beats(hand2).ShouldBeTrue(); hand2.Beats(hand1).ShouldBeFalse(); }
public void Three_of_a_kind_should_beat_lower_three_of_a_kind() { var deuces = new PokerHand("2D 2C 2S"); var threes = new PokerHand("3H 3S 3D"); deuces.Beats(threes).ShouldBeFalse(); threes.Beats(deuces).ShouldBeTrue(); }
public void Straigth_should_beat_three_of_a_kind() { var straight = new PokerHand("2C 3C 4D 5C 6C"); var threeOfAKind = new PokerHand("AC AD AH"); straight.Beats(threeOfAKind).ShouldBeTrue(); threeOfAKind.Beats(straight).ShouldBeFalse(); }
public void Three_of_a_kind_should_use_kicker_when_equal() { var hand1 = new PokerHand("2D 2C 2S AS"); var hand2 = new PokerHand("2H 2S 2D KS"); hand1.Beats(hand2).ShouldBeTrue(); hand2.Beats(hand1).ShouldBeFalse(); }
public void Three_of_a_kind_should_beat_pair() { var hand1 = new PokerHand("2D 2C 2S"); var hand2 = new PokerHand("AH AS KD"); hand1.Beats(hand2).ShouldBeTrue(); hand2.Beats(hand1).ShouldBeFalse(); }