本文整理汇总了C#中PokerHandsChecker.IsFullHouse方法的典型用法代码示例。如果您正苦于以下问题:C# PokerHandsChecker.IsFullHouse方法的具体用法?C# PokerHandsChecker.IsFullHouse怎么用?C# PokerHandsChecker.IsFullHouse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PokerHandsChecker
的用法示例。
在下文中一共展示了PokerHandsChecker.IsFullHouse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsFullHouseShouldReturnFalseIfCardsMakeFlush
public void IsFullHouseShouldReturnFalseIfCardsMakeFlush()
{
var cards = new List<ICard>() { new Card(CardFace.Ace, CardSuit.Clubs), new Card(CardFace.Queen, CardSuit.Clubs), new Card(CardFace.Ten, CardSuit.Clubs), new Card(CardFace.Five, CardSuit.Clubs), new Card(CardFace.Three, CardSuit.Clubs) };
var hand = new Hand(cards);
var checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsFullHouse(hand));
}
示例2: IsFullHouseShouldReturnFalseIfCardsAreTheSameSuit
public void IsFullHouseShouldReturnFalseIfCardsAreTheSameSuit()
{
var cards = new List<ICard>() { new Card(CardFace.King, CardSuit.Spades), new Card(CardFace.Two, CardSuit.Spades), new Card(CardFace.Five, CardSuit.Spades), new Card(CardFace.Ten, CardSuit.Spades), new Card(CardFace.Seven, CardSuit.Spades) };
var hand = new Hand(cards);
var checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsFullHouse(hand));
}
示例3: IsFullHouseShouldReturnFalseIfCardsMakeFourOfAKind
public void IsFullHouseShouldReturnFalseIfCardsMakeFourOfAKind()
{
var cards = new List<ICard>() { new Card(CardFace.Ten, CardSuit.Clubs), new Card(CardFace.Ten, CardSuit.Spades), new Card(CardFace.Ten, CardSuit.Diamonds), new Card(CardFace.Ten, CardSuit.Hearts), new Card(CardFace.Four, CardSuit.Clubs) };
var hand = new Hand(cards);
var checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsFullHouse(hand));
}
示例4: IsFullHouseShouldReturnFalseIfCardsMakeStraight
public void IsFullHouseShouldReturnFalseIfCardsMakeStraight()
{
var cards = new List<ICard>() { new Card(CardFace.Eight, CardSuit.Spades), new Card(CardFace.Seven, CardSuit.Spades), new Card(CardFace.Six, CardSuit.Clubs), new Card(CardFace.Five, CardSuit.Clubs), new Card(CardFace.Four, CardSuit.Spades) };
var hand = new Hand(cards);
var checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsFullHouse(hand));
}
示例5: TestHighCard
public void TestHighCard()
{
List<ICard> cards = new List<ICard>();
cards.Add(new Card(CardFace.Five, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Eight, CardSuit.Spades));
cards.Add(new Card(CardFace.Three, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Jack, CardSuit.Clubs));
cards.Add(new Card(CardFace.Queen, CardSuit.Spades));
Hand hand = new Hand(cards);
PokerHandsChecker checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsFullHouse(hand));
}
示例6: FullHouse3sandKings
public void FullHouse3sandKings()
{
PokerHandsChecker checker = new PokerHandsChecker();
Hand hand = new Hand(new List<ICard>() {
new Card(CardFace.King, CardSuit.Spades),
new Card(CardFace.Three, CardSuit.Clubs),
new Card(CardFace.King, CardSuit.Diamonds),
new Card(CardFace.Three, CardSuit.Spades),
new Card(CardFace.Three, CardSuit.Spades),
});
Assert.AreEqual(true, checker.IsFullHouse(hand));
}
示例7: FullHouseQueensAnd10s
public void FullHouseQueensAnd10s()
{
PokerHandsChecker checker = new PokerHandsChecker();
Hand hand = new Hand(new List<ICard>() {
new Card(CardFace.Queen, CardSuit.Diamonds),
new Card(CardFace.Queen, CardSuit.Clubs),
new Card(CardFace.Queen, CardSuit.Diamonds),
new Card(CardFace.Ten, CardSuit.Clubs),
new Card(CardFace.Ten, CardSuit.Spades),
});
Assert.AreEqual(true, checker.IsFullHouse(hand));
}
示例8: TestFullHouse
public void TestFullHouse()
{
List<ICard> cards = new List<ICard>();
cards.Add(new Card(CardFace.King, CardSuit.Diamonds));
cards.Add(new Card(CardFace.King, CardSuit.Spades));
cards.Add(new Card(CardFace.Queen, CardSuit.Hearts));
cards.Add(new Card(CardFace.Queen, CardSuit.Clubs));
cards.Add(new Card(CardFace.Queen, CardSuit.Diamonds));
Hand hand = new Hand(cards);
PokerHandsChecker checker = new PokerHandsChecker();
Assert.IsTrue(checker.IsFullHouse(hand));
}
示例9: IsFourOfAKindShouldReturnFalseWhenNotMatchingHandPassed_ThreeOfAKind
public void IsFourOfAKindShouldReturnFalseWhenNotMatchingHandPassed_ThreeOfAKind()
{
var checker = new PokerHandsChecker();
var cards = new List<ICard>
{
new Card(CardFace.Four, CardSuit.Spades),
new Card(CardFace.Four, CardSuit.Diamonds),
new Card(CardFace.Four, CardSuit.Hearts),
new Card(CardFace.Three, CardSuit.Clubs),
new Card(CardFace.Six, CardSuit.Hearts)
};
var hand = new Hand(cards);
Assert.IsFalse(checker.IsFullHouse(hand));
}
示例10: IsFullHouse_TestForFullHouse_ShouldThrowAnException
public void IsFullHouse_TestForFullHouse_ShouldThrowAnException()
{
var checker = new PokerHandsChecker();
var cards = new List<ICard>
{
new Card(CardFace.Four, CardSuit.Spades),
new Card(CardFace.Four, CardSuit.Spades),
new Card(CardFace.Four, CardSuit.Spades),
new Card(CardFace.Five, CardSuit.Spades),
new Card(CardFace.Four, CardSuit.Spades)
};
var hand = new Hand(cards);
Assert.Throws<ArgumentException>(() => checker.IsFullHouse(hand));
}
示例11: IsFullHouse_ThreeOfAKindAnd2DifferentCards
public void IsFullHouse_ThreeOfAKindAnd2DifferentCards()
{
var hand = new Hand(new List<ICard>()
{
new Card(CardFace.Seven,CardSuit.Diamonds),
new Card(CardFace.Two,CardSuit.Spades),
new Card(CardFace.Seven,CardSuit.Hearts),
new Card(CardFace.Seven,CardSuit.Clubs),
new Card(CardFace.Five,CardSuit.Hearts)
});
var pokerChecker = new PokerHandsChecker();
bool result = pokerChecker.IsFullHouse(hand);
Assert.IsFalse(result);
}
示例12: IsFullHouse_ProperFullHouseHand
public void IsFullHouse_ProperFullHouseHand()
{
var hand = new Hand(new List<ICard>()
{
new Card(CardFace.Seven,CardSuit.Diamonds),
new Card(CardFace.Seven,CardSuit.Spades),
new Card(CardFace.Seven,CardSuit.Hearts),
new Card(CardFace.Four,CardSuit.Clubs),
new Card(CardFace.Four,CardSuit.Hearts)
});
var pokerChecker = new PokerHandsChecker();
bool result = pokerChecker.IsFullHouse(hand);
Assert.IsTrue(result);
}
示例13: IsFullHouse_WithTwoPairs
public void IsFullHouse_WithTwoPairs()
{
var hand = new Hand(new List<ICard>()
{
new Card(CardFace.Seven,CardSuit.Diamonds),
new Card(CardFace.Three,CardSuit.Diamonds),
new Card(CardFace.Queen,CardSuit.Diamonds),
new Card(CardFace.Queen,CardSuit.Spades),
new Card(CardFace.Three,CardSuit.Clubs),
});
var pokerChecker = new PokerHandsChecker();
bool result = pokerChecker.IsFullHouse(hand);
Assert.IsFalse(result);
}
示例14: IsFullHouseShouldThrowException_TwoOfTheSameCards
public void IsFullHouseShouldThrowException_TwoOfTheSameCards()
{
var checker = new PokerHandsChecker();
var cards = new List<ICard>
{
new Card(CardFace.Four, CardSuit.Spades),
new Card(CardFace.Five, CardSuit.Diamonds),
new Card(CardFace.Four, CardSuit.Spades),
new Card(CardFace.Four, CardSuit.Clubs),
new Card(CardFace.Five, CardSuit.Hearts)
};
var hand = new Hand(cards);
checker.IsFullHouse(hand);
}
示例15: IsFullHouseShouldReturnTrue
public void IsFullHouseShouldReturnTrue()
{
var checker = new PokerHandsChecker();
var cards = new List<ICard>
{
new Card(CardFace.Four, CardSuit.Diamonds),
new Card(CardFace.Five, CardSuit.Diamonds),
new Card(CardFace.Four, CardSuit.Spades),
new Card(CardFace.Four, CardSuit.Clubs),
new Card(CardFace.Five, CardSuit.Hearts)
};
var hand = new Hand(cards);
Assert.IsTrue(checker.IsFullHouse(hand));
}