예제 #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),
         }
     }));
 }
예제 #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),
         }
     }));
 }
예제 #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),
         }
     }));
 }
예제 #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),
         }
     }));
 }
예제 #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),
         }
     }));
 }
예제 #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),
         }
     }));
 }
예제 #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),
         }
     }));
 }
예제 #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),
         }
     }));
 }