本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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");
}
示例5: ExpectTrumpCardToBeCorrectAfterAChange
public void ExpectTrumpCardToBeCorrectAfterAChange()
{
var deck = new Deck();
var trumpCard = deck.GetNextCard();
deck.ChangeTrumpCard(trumpCard);
Assert.AreSame(deck.GetTrumpCard, trumpCard);
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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!");
}
示例11: CreatingNewDeckAndChangingDefaultTrumpCardWithTheSameTrumpCardShouldReturnTheSameTrumpCard
public void CreatingNewDeckAndChangingDefaultTrumpCardWithTheSameTrumpCardShouldReturnTheSameTrumpCard()
{
var deck = new Deck();
var trumpCard = deck.GetTrumpCard;
deck.ChangeTrumpCard(trumpCard);
Assert.AreSame(trumpCard, deck.GetTrumpCard);
}
示例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);
}
示例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");
}
示例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);
}
示例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));
}