public void TestPokerHandThreeOfKind() { Pokerhand hand = new Pokerhand(); hand.add(new Card("9", CardType.TREFLE, 9)); hand.add(new Card("9", CardType.COEUR, 9)); hand.add(new Card("3", CardType.TREFLE, 3)); hand.add(new Card("9", CardType.CARREAU, 9)); hand.add(new Card("10", CardType.CARREAU, 10)); Assert.IsTrue(hand.IsThreeOfKind()); }
public void TestPokerHandStraight() { Pokerhand hand = new Pokerhand(); hand.add(new Card("7", CardType.PIQUE, 7)); hand.add(new Card("3", CardType.COEUR, 3)); hand.add(new Card("4", CardType.TREFLE, 4)); hand.add(new Card("5", CardType.CARREAU, 5)); hand.add(new Card("6", CardType.TREFLE, 6)); Assert.IsTrue(hand.IsStraight()); }
public void TestPokerHandTwoPairs() { Pokerhand hand = new Pokerhand(); hand.add(new Card("6", CardType.TREFLE, 6)); hand.add(new Card("6", CardType.COEUR, 6)); hand.add(new Card("3", CardType.TREFLE, 3)); hand.add(new Card("3", CardType.CARREAU, 3)); hand.add(new Card("10", CardType.CARREAU, 10)); Assert.IsTrue(hand.IsTwoPairs()); }
public void TestPokerHandRoyalFlush() { Pokerhand hand = new Pokerhand(); hand.add(new Card("A", CardType.COEUR, 14)); hand.add(new Card("K", CardType.COEUR, 13)); hand.add(new Card("Q", CardType.COEUR, 12)); hand.add(new Card("J", CardType.COEUR, 11)); hand.add(new Card("10", CardType.COEUR, 10)); Assert.IsTrue(hand.IsRoyalFlush()); }
public void TestPokerHandStraightFlush() { Pokerhand hand = new Pokerhand(); hand.add(new Card("2", CardType.COEUR, 2)); hand.add(new Card("3", CardType.COEUR, 3)); hand.add(new Card("4", CardType.COEUR, 4)); hand.add(new Card("5", CardType.COEUR, 5)); hand.add(new Card("6", CardType.COEUR, 6)); Assert.IsTrue(hand.IsStraightFlush()); }
public void TestPokerHandSquare() { Pokerhand hand = new Pokerhand(); hand.add(new Card("7", CardType.COEUR, 7)); hand.add(new Card("7", CardType.TREFLE, 7)); hand.add(new Card("7", CardType.CARREAU, 7)); hand.add(new Card("7", CardType.PIQUE, 7)); hand.add(new Card("J", CardType.COEUR, 11)); Assert.IsTrue(hand.IsSquare()); }
public void TestPokerHandFlush() { Pokerhand hand = new Pokerhand(); hand.add(new Card("7", CardType.COEUR, 7)); hand.add(new Card("3", CardType.COEUR, 3)); hand.add(new Card("4", CardType.COEUR, 4)); hand.add(new Card("Q", CardType.COEUR, 12)); hand.add(new Card("K", CardType.COEUR, 13)); Assert.IsTrue(hand.IsFlush()); }