當前位置: 首頁>>代碼示例>>C#>>正文


C# Deck.ChangeTrumpCard方法代碼示例

本文整理匯總了C#中Santase.Logic.Cards.Deck.ChangeTrumpCard方法的典型用法代碼示例。如果您正苦於以下問題:C# Deck.ChangeTrumpCard方法的具體用法?C# Deck.ChangeTrumpCard怎麽用?C# Deck.ChangeTrumpCard使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Santase.Logic.Cards.Deck的用法示例。


在下文中一共展示了Deck.ChangeTrumpCard方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ChangingTrumpCardShouldNotThrow

 public void ChangingTrumpCardShouldNotThrow()
 {
     Deck deck = new Deck();
     Card trumpCard = deck.GetTrumpCard;
     Card newCard = new Card(CardSuit.Heart, CardType.Nine);
     deck.ChangeTrumpCard(newCard);
 }
開發者ID:Rostech,項目名稱:TelerikAcademyHomeworks,代碼行數:7,代碼來源:DeckTests.cs

示例2: ExpectTrumpCardToEqualSwappedCard

 public void ExpectTrumpCardToEqualSwappedCard()
 {
     var deck = new Deck();
     var card = new Card(CardSuit.Club, CardType.Ace);
     deck.ChangeTrumpCard(card);
     Assert.AreEqual(card, deck.GetTrumpCard);
 }
開發者ID:kiko81,項目名稱:Teleric-Academy-Homeworks,代碼行數:7,代碼來源:DeckTests.cs

示例3: TestDeckChangeTrumpCard

 public void TestDeckChangeTrumpCard()
 {
     var card = new Card(CardSuit.Club, CardType.Jack);
     var deck = new Santase.Logic.Cards.Deck();
     deck.ChangeTrumpCard(card);
     Assert.AreEqual(card, deck.GetTrumpCard);
 }
開發者ID:SimoPrG,項目名稱:TelerikAcademyHomeworks,代碼行數:7,代碼來源:DeckNUnitTests.cs

示例4: Test_DeckClassGetTrumpCardAndTryToChangeItWithTheSame

 public void Test_DeckClassGetTrumpCardAndTryToChangeItWithTheSame()
 {
     var deck = new Deck();
     var trumpCard = deck.GetTrumpCard;
     deck.ChangeTrumpCard(trumpCard);
     Assert.AreEqual(trumpCard, deck.GetTrumpCard, "Trump card should no tbe changed");
 }
開發者ID:tddold,項目名稱:High-Quality-Code-Homeworks,代碼行數:7,代碼來源:TestDeck.cs

示例5: ExpectTrumpCardToBeCorrectAfterAChange

 public void ExpectTrumpCardToBeCorrectAfterAChange()
 {
     var deck = new Deck();
     var trumpCard = deck.GetNextCard();
     deck.ChangeTrumpCard(trumpCard);
     Assert.AreSame(deck.GetTrumpCard, trumpCard);
 }
開發者ID:radenkovn,項目名稱:Telerik-Homework,代碼行數:7,代碼來源:DeckClassTests.cs

示例6: TestChangeWtihDifferentTrumps

        public void TestChangeWtihDifferentTrumps(string patternForCard)
        {
            Deck cards = new Deck();
            Card trump = GenerateCard(patternForCard);
            cards.ChangeTrumpCard(trump);

            Assert.AreEqual(trump.Type.ToFriendlyString() + trump.Suit.ToFriendlyString(), cards.GetTrumpCard.ToString());
        }
開發者ID:viktorD1m1trov,項目名稱:T-Academy,代碼行數:8,代碼來源:DeckTest.cs

示例7: ChangeTrumpCardShouldWorkProperly

 public void ChangeTrumpCardShouldWorkProperly()
 {
     IDeck deck = new Deck();
     var card = new Card(CardSuit.Spade, CardType.Nine);
     deck.ChangeTrumpCard(card);
     var trumpCard = deck.TrumpCard;
     Assert.AreEqual(card, trumpCard);
 }
開發者ID:NotDemons,項目名稱:NotDemonsRepo,代碼行數:8,代碼來源:DeckTests.cs

示例8: DeckShouldReturnProperTrumpCardAfterChangingIt

 public void DeckShouldReturnProperTrumpCardAfterChangingIt()
 {
     var deck = new Deck();
     var newTrumpCard = new Card(CardSuit.Heart, CardType.Ace);
     deck.ChangeTrumpCard(newTrumpCard);
     var currentTrumpCard = deck.GetTrumpCard;
     Assert.AreSame(newTrumpCard, currentTrumpCard);
 }
開發者ID:zondario,項目名稱:TelerikAcademy-Homeworks,代碼行數:8,代碼來源:DeckTests.cs

示例9: ChangeTrumpCardShouldChangeTheTrumpCardIfThereAreCardsLeftInTheDeck

 public void ChangeTrumpCardShouldChangeTheTrumpCardIfThereAreCardsLeftInTheDeck()
 {
     Deck testDeck = new Deck();
     Card initialTrumpCard = testDeck.GetTrumpCard;
     Card newCard = testDeck.GetNextCard();
     testDeck.ChangeTrumpCard(newCard);
     Assert.AreNotSame(initialTrumpCard, testDeck.GetTrumpCard);
 }
開發者ID:Hris21,項目名稱:High-Quality-Code,代碼行數:8,代碼來源:DeckTests.cs

示例10: ChangeTrumpCardChangesItSuccessfully

        public void ChangeTrumpCardChangesItSuccessfully()
        {
            var deck = new Deck();
            var trumpCard = deck.GetTrumpCard;
            deck.ChangeTrumpCard(new Card(CardSuit.Club, CardType.Ace));
            var changedTrumpCard = deck.GetTrumpCard;

            Assert.AreNotEqual(trumpCard, changedTrumpCard, "Trump cards are the same! Rerun test if by chance the original trump card was the same as the new one!");
        }
開發者ID:NK-Hertz,項目名稱:Telerik-Academy-2015,代碼行數:9,代碼來源:Class1.cs

示例11: CreatingNewDeckAndChangingDefaultTrumpCardWithTheSameTrumpCardShouldReturnTheSameTrumpCard

        public void CreatingNewDeckAndChangingDefaultTrumpCardWithTheSameTrumpCardShouldReturnTheSameTrumpCard()
        {
            var deck = new Deck();
            var trumpCard = deck.GetTrumpCard;

            deck.ChangeTrumpCard(trumpCard);

            Assert.AreSame(trumpCard, deck.GetTrumpCard);
        }
開發者ID:AYankova,項目名稱:HQC,代碼行數:9,代碼來源:DeckTests.cs

示例12: DeckShouldChangeTrumpCardCorrectly

        public void DeckShouldChangeTrumpCardCorrectly()
        {
            Deck deck = new Deck();
            Card newTrumpCard = new Card(CardSuit.Spade, CardType.Ace);

            deck.ChangeTrumpCard(newTrumpCard);

            Assert.AreEqual(newTrumpCard, deck.GetTrumpCard);
        }
開發者ID:atanas-georgiev,項目名稱:TelerikAcademy-1,代碼行數:9,代碼來源:DeckTests.cs

示例13: ChangeTrumpCardTest

        public void ChangeTrumpCardTest(CardSuit suit, CardType type)
        {
            var newCard = new Card(suit, type);
            var deck = new Deck();

            deck.ChangeTrumpCard(newCard);

            Assert.AreNotEqual(0, deck.CardsLeft, "Change card doesn't work");
        }
開發者ID:deyantodorov,項目名稱:TelerikAcademy,代碼行數:9,代碼來源:DeckTests.cs

示例14: ChangeTrumpCardShouldChangeDeckTrumpCardToTheNewTrumpCardInstance

        public void ChangeTrumpCardShouldChangeDeckTrumpCardToTheNewTrumpCardInstance()
        {
            var deck = new Deck();
            var newTrumpCard = new Card(CardSuit.Club, CardType.Ace);

            deck.ChangeTrumpCard(newTrumpCard);

            Assert.AreEqual(newTrumpCard, deck.GetTrumpCard);
        }
開發者ID:tddold,項目名稱:TelerikAcademy-5,代碼行數:9,代碼來源:DeckNUnitTests.cs

示例15: TestChangeDeckTrump

        public void TestChangeDeckTrump()
        {
            Card trumpCard = new Card(CardSuit.Heart, CardType.King);
            Deck deck = new Deck();

            deck.ChangeTrumpCard(trumpCard);

            Assert.AreEqual(trumpCard, deck.GetTrumpCard);
            Assert.AreEqual(true, deck.GetTrumpCard.Equals(trumpCard));
        }
開發者ID:tddold,項目名稱:Telerik-Academy-3,代碼行數:10,代碼來源:DeckTest.cs


注:本文中的Santase.Logic.Cards.Deck.ChangeTrumpCard方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。