Exemple #1
0
        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());
        }
Exemple #2
0
        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());
        }
Exemple #3
0
        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());
        }
Exemple #4
0
        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());
        }
Exemple #5
0
        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());
        }
Exemple #6
0
        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());
        }
Exemple #7
0
        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());
        }