本文整理汇总了C#中Deck.Shuffle2方法的典型用法代码示例。如果您正苦于以下问题:C# Deck.Shuffle2方法的具体用法?C# Deck.Shuffle2怎么用?C# Deck.Shuffle2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Deck
的用法示例。
在下文中一共展示了Deck.Shuffle2方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Shuffle2_Deck_Should_Return_Two_Random_Decks_Should_Fail_Due_Randon_Seeding
public void Shuffle2_Deck_Should_Return_Two_Random_Decks_Should_Fail_Due_Randon_Seeding()
{
var deck = new Deck();
var shuffledDeck1 = deck.Shuffle2(deck.DeckBuilder());
var shuffledDeck2 = deck.Shuffle2(deck.DeckBuilder());
Assert.IsFalse(Deck.AreDeckEquals(shuffledDeck1, shuffledDeck2));
}
示例2: Check_Shffuled_Deck_For_Each_Suit
public void Check_Shffuled_Deck_For_Each_Suit()
{
var deck = new Deck();
var shuffledDeck1 = deck.Shuffle2(deck.DeckBuilder());
var shuffledDeck2 = deck.Shuffle2(deck.DeckBuilder());
var suits = shuffledDeck2.GroupBy(s => s.Suit);
Assert.IsNotNull(suits);
}
示例3: Shuffle2_Ordered_Deck_And_Return_False_If_Deck_Are_Not_Shuffled
public void Shuffle2_Ordered_Deck_And_Return_False_If_Deck_Are_Not_Shuffled()
{
var deck = new Deck();
var orderedDeck = deck.DeckBuilder();
var shuffledDeck = deck.Shuffle2(deck.DeckBuilder());
Assert.IsFalse(Deck.AreDeckEquals(orderedDeck,shuffledDeck));
}
示例4: Shuffle2_Deck_Should_Return_Two_Random_Decks_Should_Return_False
public void Shuffle2_Deck_Should_Return_Two_Random_Decks_Should_Return_False()
{
var interval = new TimeSpan(0,0,1);
var deck = new Deck();
var shuffledDeck1 = deck.Shuffle2(deck.DeckBuilder());
Thread.Sleep(interval);
var shuffledDeck2 = deck.Shuffle2(deck.DeckBuilder());
Assert.IsFalse(Deck.AreDeckEquals(shuffledDeck1, shuffledDeck2));
}