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


C# Deck.DeckBuilder方法代码示例

本文整理汇总了C#中Deck.DeckBuilder方法的典型用法代码示例。如果您正苦于以下问题:C# Deck.DeckBuilder方法的具体用法?C# Deck.DeckBuilder怎么用?C# Deck.DeckBuilder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Deck的用法示例。


在下文中一共展示了Deck.DeckBuilder方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: Deck_Should_Be_Without_Duplicates_After_Shuffle

        public void Deck_Should_Be_Without_Duplicates_After_Shuffle()
        {
            var deck = new Deck();
            var shuffledDeck = deck.Shuffle(deck.DeckBuilder());

            Assert.IsTrue(deck.IsDeckValid(shuffledDeck));
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:7,代码来源:CardShuffle.cs

示例4: DecksEqual_Should_Return_True

        public void DecksEqual_Should_Return_True()
        {
            var deck = new Deck();
            var deck1 = deck.DeckBuilder();

            Assert.IsTrue(Deck.AreDeckEquals(deck1,deck1));
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:7,代码来源:CardShuffle.cs

示例5: DeckBuilder_Is_Correct_Length

        public void DeckBuilder_Is_Correct_Length()
        {
            var deck = new Deck();
            var expectedLenth = 52;

            Assert.AreEqual(expectedLenth, deck.DeckBuilder().Length);
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:7,代码来源:CardShuffle.cs

示例6: DecksEqual_Should_Return_False

        public void DecksEqual_Should_Return_False()
        {
            var deck = new Deck();
            var deck1 = deck.DeckBuilder();
            var deck2 = deck1.Reverse().ToArray();

            Assert.IsFalse(Deck.AreDeckEquals(deck1,deck2));
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:8,代码来源:CardShuffle.cs

示例7: 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

示例8: 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

示例9: Shuffle_Two_Decks_To_Insure_Decks_Are_Random_Should_Return_True

        public void Shuffle_Two_Decks_To_Insure_Decks_Are_Random_Should_Return_True()
        {
            var deck = new Deck();
            var shuffledDeck1 = deck.Shuffle(deck.DeckBuilder());
            var shuffledDeck2 = deck.Shuffle(deck.DeckBuilder());

            Assert.IsFalse(Deck.AreDeckEquals(shuffledDeck1, shuffledDeck2));
        }
开发者ID:bryagd,项目名称:CardDojo,代码行数:8,代码来源:CardShuffle.cs


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