当前位置: 首页>>代码示例>>C#>>正文


C# Deck.Shuffle2方法代码示例

本文整理汇总了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));
 }
开发者ID:bryagd,项目名称:CardDojo,代码行数:7,代码来源:CardShuffle.cs

示例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);
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:10,代码来源:CardShuffle.cs

示例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));
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:8,代码来源:CardShuffle.cs

示例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));
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:10,代码来源:CardShuffle.cs


注:本文中的Deck.Shuffle2方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。