本文整理汇总了C#中Dominion.Card类的典型用法代码示例。如果您正苦于以下问题:C# Card类的具体用法?C# Card怎么用?C# Card使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Card类属于Dominion命名空间,在下文中一共展示了Card类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AmountWillingtoOverPayFor
public int AmountWillingtoOverPayFor(Card card, GameState gameState)
{
if (predicate(gameState))
return this.picker.AmountWillingtoOverPayFor(card, gameState);
return 0;
}
示例2: CountOfPileLessthanEqual
private static bool CountOfPileLessthanEqual(Card cardType, GameState gameState, int count)
{
if (gameState.GetSupplyPile(cardType) == null)
return true;
return CountOfPile(cardType, gameState) <= count;
}
示例3: MatchDescription
public MatchDescription(CountSource countSource, Card cardType, Comparison comparison, int threshhold)
{
this.cardType = cardType;
this.countSource = countSource;
this.comparison = comparison;
this.countThreshHold = threshhold;
}
示例4: testEquals
public void testEquals()
{
Card test = new Card(0, 0, 0, 0, 1, 0, 0, "Estate", "Single Victory Point", 2, "Null");
Card estate = new Card(0, 0, 0, 0, 1, 0, 0, "Estate", "Single Victory Point", 2, "Null");
Object generic = new Object();
Assert.True(test.Equals(estate));
Assert.False(test.Equals(generic));
Card oneoff = new Card(1, 0, 0, 0, 1, 0, 0, "Estate", "Single Victory Point", 2, "Null");
oneoff = new Card(0, 1, 0, 0, 1, 0, 0, "Estate", "Single Victory Point", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 1, 0, 1, 0, 0, "Estate", "Single Victory Point", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 0, 1, 1, 0, 0, "Estate", "Single Victory Point", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 0, 0, 0, 0, 0, "Estate", "Single Victory Point", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 0, 0, 1, 1, 0, "Estate", "Single Victory Point", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 0, 0, 1, 0, 1, "Estate", "Single Victory Point", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 0, 0, 1, 0, 0, "Not Estate", "Single Victory Point", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 0, 0, 1, 0, 0, "Estate", "Changed Description", 2, "Null");
Assert.False(test.Equals(oneoff));
oneoff = new Card(0, 0, 0, 0, 1, 0, 0, "Estate", "Single Victory Point", 0, "Null");
Assert.False(test.Equals(oneoff));
}
示例5: ShouldByLastCard
private static bool ShouldByLastCard(Card card, GameState gameState)
{
if (CountOfPile(card, gameState) != 1)
return true;
return CountOfPile(Cards.Province, gameState) == 1;
}
示例6: ShouldPutCardOnTopOfDeck
public override bool ShouldPutCardOnTopOfDeck(Card card, GameState gameState)
{
if (this.playerAction.discardOrder.DoesCardPickerMatch(gameState, card))
return false;
return true;
}
示例7: For
public static CardAcceptanceDescription For(Card card)
{
return new CardAcceptanceDescription(card, new MatchDescription[]
{
new MatchDescription(CountSource.Always, card, Comparison.GreaterThan, 0),
});
}
示例8: Player
public static PlayerAction Player(Card card, int cardCount = 1)
{
return new PlayerAction(
"BigMoneyCartographer",
purchaseOrder: PurchaseOrder(card, cardCount),
actionOrder: ActionOrder(card));
}
示例9: CountMightDraw
public static int CountMightDraw(Card card, GameState gameState, int maxCount)
{
if (gameState.Self.CardsInDeck.Count >= maxCount)
return CountInDeck(card, gameState);
else
return CountInDeckAndDiscard(card, gameState);
}
示例10: DiscardedCard
public void DiscardedCard(PlayerState playerState, Card card)
{
for (int i = 0; i < this.gameLogs.Length; ++i)
{
this.gameLogs[i].DiscardedCard(playerState, card);
}
}
示例11: drawMoreThanAll
public void drawMoreThanAll()
{
int rem = this.stackDefault.cardsRemaining();
Card test = new Card(0, 0, 0, 0, 0, 0, 0, "String one", "String two", 0, "String three");
for (int i = 0; i <= rem; i++)
{
test = this.stackDefault.buyOne();
}
Assert.True(this.stackDefault.isEmpty());
Assert.Null(test);
rem = this.stackOne.cardsRemaining();
for (int i = 0; i <= rem; i++)
{
test = this.stackOne.buyOne();
}
Assert.True(this.stackOne.isEmpty());
Assert.Null(test);
rem = this.stackFive.cardsRemaining();
for (int i = 0; i <= rem; i++)
{
test = this.stackFive.buyOne();
}
Assert.True(this.stackFive.isEmpty());
Assert.Null(test);
}
示例12: Player
public static PlayerAction Player(Card card, string strategyName, int playerNumber, Card secondCard = null, int count = 1)
{
return new PlayerAction(
strategyName,
playerNumber,
purchaseOrder: PurchaseOrder(card, secondCard, count));
}
示例13: Player
public static PlayerAction Player(Card card,
string playerName = null,
int cardCount = 1,
int afterSilverCount = 0,
int countGoldBeforeProvince = 3,
int countRemainingProvinceBeforeDuchy = 4,
int countRemainingProvinceBeforeEstateOverGold = 1,
int countRemainingProvinceBeforeEstateOverSilver = 3,
int afterGoldCount = int.MaxValue,
bool enablePenultimateProvinceRule = false)
{
return new PlayerAction(
playerName == null ? "BigMoney" + card.GetType().Name : playerName,
purchaseOrder: PurchaseOrder(
card,
cardCount,
afterSilverCount,
afterGoldCount == int.MaxValue && card.DefaultCoinCost >= Cards.Gold.DefaultCoinCost ? 0 : afterGoldCount,
countGoldBeforeProvince,
countRemainingProvinceBeforeDuchy,
countRemainingProvinceBeforeEstateOverGold,
countRemainingProvinceBeforeEstateOverSilver),
actionOrder:ActionOrder(card),
enablePenultimateProvinceRule:enablePenultimateProvinceRule);
}
示例14: AddNCardsToTop
public void AddNCardsToTop(Card card, int count)
{
for (int i = 0; i < count; ++i)
{
this.AddCardToTop(card);
}
}
示例15: ChooseBetweenTrashAndTopDeck
public override DeckPlacement ChooseBetweenTrashAndTopDeck(GameState gameState, Card card)
{
if (playerAction.gainOrder.DoesCardPickerMatch(gameState, card))
return DeckPlacement.TopOfDeck;
return DeckPlacement.Trash;
}