Esempio n. 1
0
 public void TestTwoPairs()
 {
     Assert.IsTrue(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MinorCardNomination(8), Suit.Clubs),
             new Card(new MinorCardNomination(8), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(4), Suit.Spades),
         },
         new[]
         {
             new Card(new MinorCardNomination(8), Suit.Clubs),
             new Card(new MinorCardNomination(8), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(3), Suit.Spades),
         }
     }));
 }
Esempio n. 2
0
 public void TestOdd2()
 {
     Assert.IsFalse(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MinorCardNomination(8), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Hearts),
             new Card(new MinorCardNomination(2), Suit.Spades),
         },
         new[]
         {
             new Card(new MinorCardNomination(8), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Hearts),
             new Card(new MinorCardNomination(2), Suit.Spades),
         }
     }));
 }
Esempio n. 3
0
 public void TestOdd1()
 {
     Assert.IsTrue(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MinorCardNomination(8), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Hearts),
             new Card(new MinorCardNomination(2), Suit.Spades),
         },
         new[]
         {
             new Card(new MinorCardNomination(7), Suit.Diamonds),
             new Card(new MinorCardNomination(4), Suit.Spades),
             new Card(new MinorCardNomination(5), Suit.Diamonds),
             new Card(new MinorCardNomination(3), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
         }
     }));
 }
Esempio n. 4
0
 public void TestRoyalFush()
 {
     Assert.IsFalse(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Jack), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Queen), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Clubs),
         },
         new[]
         {
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Jack), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Queen), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Clubs),
         }
     }));
 }
Esempio n. 5
0
 public void TestStraightFlush()
 {
     Assert.IsTrue(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MinorCardNomination(8), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Jack), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Clubs),
             new Card(new MinorCardNomination(7), Suit.Clubs),
         },
         new[]
         {
             new Card(new MinorCardNomination(8), Suit.Clubs),
             new Card(new MinorCardNomination(6), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Clubs),
             new Card(new MinorCardNomination(7), Suit.Clubs),
         }
     }));
 }
Esempio n. 6
0
 public void TestFullHouse()
 {
     Assert.IsTrue(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MinorCardNomination(10), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Spades),
         },
         new[]
         {
             new Card(new MinorCardNomination(9), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Spades),
         }
     }));
 }
Esempio n. 7
0
 public void TestStraight3()
 {
     Assert.IsTrue(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Jack), Suit.Clubs),
             new Card(new MinorCardNomination(10), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.Queen), Suit.Clubs),
         },
         new[]
         {
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
             new Card(new MinorCardNomination(4), Suit.Spades),
             new Card(new MinorCardNomination(3), Suit.Spades),
             new Card(new MinorCardNomination(5), Suit.Spades),
             new Card(new MinorCardNomination(2), Suit.Spades),
         }
     }));
 }
Esempio n. 8
0
 public void TestThreeOfAKind()
 {
     Assert.IsTrue(HandsResolver.IsPlayer1Wins(new[]
     {
         new[]
         {
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(4), Suit.Spades),
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.Ace), Suit.Clubs),
         },
         new[]
         {
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MajorCardNomination(MajorCardType.King), Suit.Clubs),
             new Card(new MinorCardNomination(9), Suit.Hearts),
             new Card(new MinorCardNomination(2), Suit.Spades),
         }
     }));
 }