public void CanScoreStraight() { var hand = new Hand(); new List <Card> { new Card(CardValue.Six, CardSuit.Hearts), new Card(CardValue.Four, CardSuit.Spades), new Card(CardValue.Three, CardSuit.Clubs), new Card(CardValue.Five, CardSuit.Spades), new Card(CardValue.Two, CardSuit.Diamonds) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Straight"); }
public void CanScoreFullHouse() { var hand = new Hand(); new List <Card> { new Card(CardValue.Ace, CardSuit.Diamonds), new Card(CardValue.Ace, CardSuit.Clubs), new Card(CardValue.Ace, CardSuit.Spades), new Card(CardValue.Two, CardSuit.Hearts), new Card(CardValue.Two, CardSuit.Spades) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Full house"); }
public void CanScoreThreeOfAKind() { var hand = new Hand(); new List <Card> { new Card(CardValue.Eight, CardSuit.Clubs), new Card(CardValue.Six, CardSuit.Spades), new Card(CardValue.Eight, CardSuit.Diamonds), new Card(CardValue.Queen, CardSuit.Spades), new Card(CardValue.Eight, CardSuit.Spades) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Three of a kind"); }
public void CanScoreFlush() { var hand = new Hand(); new List <Card> { new Card(CardValue.Ace, CardSuit.Spades), new Card(CardValue.Six, CardSuit.Spades), new Card(CardValue.Ten, CardSuit.Spades), new Card(CardValue.Two, CardSuit.Spades), new Card(CardValue.Two, CardSuit.Spades) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Flush"); }
public void CanScoreFullHouse() { var hand = new Hand(); new List<Card> { new Card(CardValue.Ace, CardSuit.Diamonds), new Card(CardValue.Ace, CardSuit.Clubs), new Card(CardValue.Ace, CardSuit.Spades), new Card(CardValue.Two, CardSuit.Hearts), new Card(CardValue.Two, CardSuit.Spades) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Full house"); }
public void CanScoreFlush() { var hand = new Hand(); new List<Card> { new Card(CardValue.Ace, CardSuit.Spades), new Card(CardValue.Six, CardSuit.Spades), new Card(CardValue.Ten, CardSuit.Spades), new Card(CardValue.Two, CardSuit.Spades), new Card(CardValue.Two, CardSuit.Spades) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Flush"); }
public void CanScorePair() { var hand = new Hand(); new List<Card> { new Card(CardValue.Ace, CardSuit.Diamonds), new Card(CardValue.Eight, CardSuit.Spades), new Card(CardValue.Queen, CardSuit.Spades), new Card(CardValue.Six, CardSuit.Spades), new Card(CardValue.Queen, CardSuit.Clubs) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Pair"); }
public void CanScoreStraightFlush() { var hand = new Hand(); new List<Card> { new Card(CardValue.Two, CardSuit.Diamonds), new Card(CardValue.Four, CardSuit.Diamonds), new Card(CardValue.Three, CardSuit.Diamonds), new Card(CardValue.Five, CardSuit.Diamonds), new Card(CardValue.Six, CardSuit.Diamonds) } .ForEach(card => hand.Draw(card)); var scorer = new HandScorer(hand, new FiveCardPokerRanks().HandRanks); scorer.GetScore().Name.Should().Be("Straight flush"); }