本文整理汇总了C#中PokerHandsChecker.IsHighCard方法的典型用法代码示例。如果您正苦于以下问题:C# PokerHandsChecker.IsHighCard方法的具体用法?C# PokerHandsChecker.IsHighCard怎么用?C# PokerHandsChecker.IsHighCard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PokerHandsChecker
的用法示例。
在下文中一共展示了PokerHandsChecker.IsHighCard方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestThreeOfAKind
public void TestThreeOfAKind()
{
List<ICard> cards = new List<ICard>();
cards.Add(new Card(CardFace.Five, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Five, CardSuit.Spades));
cards.Add(new Card(CardFace.Three, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Five, CardSuit.Clubs));
cards.Add(new Card(CardFace.Queen, CardSuit.Spades));
Hand hand = new Hand(cards);
PokerHandsChecker checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsHighCard(hand));
}
示例2: HighCardKing
public void HighCardKing()
{
PokerHandsChecker checker = new PokerHandsChecker();
Hand hand = new Hand(new List<ICard>() {
new Card(CardFace.Six, CardSuit.Diamonds),
new Card(CardFace.Two, CardSuit.Spades),
new Card(CardFace.Jack, CardSuit.Hearts),
new Card(CardFace.Ten, CardSuit.Spades),
new Card(CardFace.King, CardSuit.Clubs),
});
Assert.AreEqual(true, checker.IsHighCard(hand));
}
示例3: TestInvalidHand
public void TestInvalidHand()
{
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.King, CardSuit.Hearts));
cards.Add(new Card(CardFace.King, CardSuit.Clubs));
cards.Add(new Card(CardFace.King, CardSuit.Clubs));
Hand hand = new Hand(cards);
PokerHandsChecker checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsHighCard(hand));
}
示例4: IsHighCardShoudReturnTrue
public void IsHighCardShoudReturnTrue()
{
var checker = new PokerHandsChecker();
var cards = new List<ICard>
{
new Card(CardFace.Ace, CardSuit.Diamonds),
new Card(CardFace.King, CardSuit.Diamonds),
new Card(CardFace.Two, CardSuit.Spades),
new Card(CardFace.Three, CardSuit.Spades),
new Card(CardFace.Five, CardSuit.Hearts)
};
var hand = new Hand(cards);
Assert.IsTrue(checker.IsHighCard(hand));
}
示例5: IsHighCardShoudReturnFalseWhenNotMatchingHandPassed_OnePair
public void IsHighCardShoudReturnFalseWhenNotMatchingHandPassed_OnePair()
{
var checker = new PokerHandsChecker();
var cards = new List<ICard>
{
new Card(CardFace.Ace, CardSuit.Diamonds),
new Card(CardFace.King, CardSuit.Diamonds),
new Card(CardFace.Two, CardSuit.Spades),
new Card(CardFace.Two, CardSuit.Diamonds),
new Card(CardFace.Five, CardSuit.Hearts)
};
var hand = new Hand(cards);
Assert.IsFalse(checker.IsHighCard(hand));
}
示例6: InvalidHighCardStraight
public void InvalidHighCardStraight()
{
PokerHandsChecker checker = new PokerHandsChecker();
Hand hand = new Hand(new List<ICard>() {
new Card(CardFace.Ten, CardSuit.Diamonds),
new Card(CardFace.Eight, CardSuit.Clubs),
new Card(CardFace.Jack, CardSuit.Diamonds),
new Card(CardFace.Nine, CardSuit.Clubs),
new Card(CardFace.Queen, CardSuit.Spades),
});
Assert.AreEqual(false, checker.IsHighCard(hand));
}
示例7: InvalidHighCardFlush
public void InvalidHighCardFlush()
{
PokerHandsChecker checker = new PokerHandsChecker();
Hand hand = new Hand(new List<ICard>() {
new Card(CardFace.Six, CardSuit.Diamonds),
new Card(CardFace.Two, CardSuit.Diamonds),
new Card(CardFace.Jack, CardSuit.Diamonds),
new Card(CardFace.Ten, CardSuit.Diamonds),
new Card(CardFace.Jack, CardSuit.Diamonds),
});
Assert.AreEqual(false, checker.IsHighCard(hand));
}
示例8: TestStraight
public void TestStraight()
{
List<ICard> cards = new List<ICard>();
cards.Add(new Card(CardFace.Five, CardSuit.Spades));
cards.Add(new Card(CardFace.Six, CardSuit.Spades));
cards.Add(new Card(CardFace.Seven, CardSuit.Clubs));
cards.Add(new Card(CardFace.Eight, CardSuit.Spades));
cards.Add(new Card(CardFace.Nine, CardSuit.Spades));
Hand hand = new Hand(cards);
PokerHandsChecker checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsHighCard(hand));
}
示例9: TestFlush
public void TestFlush()
{
List<ICard> cards = new List<ICard>();
cards.Add(new Card(CardFace.Five, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Eight, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Three, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Jack, CardSuit.Diamonds));
cards.Add(new Card(CardFace.Queen, CardSuit.Diamonds));
Hand hand = new Hand(cards);
PokerHandsChecker checker = new PokerHandsChecker();
Assert.IsFalse(checker.IsHighCard(hand));
}