本文整理汇总了C#中Dominion.Card类的典型用法代码示例。如果您正苦于以下问题:C# Card类的具体用法?C# Card怎么用?C# Card使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Card类属于Dominion命名空间,在下文中一共展示了Card类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AmountWillingtoOverPayFor
public int AmountWillingtoOverPayFor(Card card, GameState gameState)
{
if (predicate(gameState))
return this.picker.AmountWillingtoOverPayFor(card, gameState);
return 0;
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:CardPickForCondition.cs
示例2: CountOfPileLessthanEqual
private static bool CountOfPileLessthanEqual(Card cardType, GameState gameState, int count)
{
if (gameState.GetSupplyPile(cardType) == null)
return true;
return CountOfPile(cardType, gameState) <= count;
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:MountebankHoard.cs
示例3: MatchDescription
public MatchDescription(CountSource countSource, Card cardType, Comparison comparison, int threshhold)
{
this.cardType = cardType;
this.countSource = countSource;
this.comparison = comparison;
this.countThreshHold = threshhold;
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:MatchDescription.cs
示例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));
}
开发者ID:postcn,项目名称:Dominion,代码行数:27,代码来源:CardTest.cs
示例5: ShouldByLastCard
private static bool ShouldByLastCard(Card card, GameState gameState)
{
if (CountOfPile(card, gameState) != 1)
return true;
return CountOfPile(Cards.Province, gameState) == 1;
}
开发者ID:peterhal,项目名称:Dominulator,代码行数:7,代码来源:GardensBeggarIronworks.cs
示例6: ShouldPutCardOnTopOfDeck
public override bool ShouldPutCardOnTopOfDeck(Card card, GameState gameState)
{
if (this.playerAction.discardOrder.DoesCardPickerMatch(gameState, card))
return false;
return true;
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:PearlDiver.cs
示例7: For
public static CardAcceptanceDescription For(Card card)
{
return new CardAcceptanceDescription(card, new MatchDescription[]
{
new MatchDescription(CountSource.Always, card, Comparison.GreaterThan, 0),
});
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:CardAcceptanceDescription.cs
示例8: Player
public static PlayerAction Player(Card card, int cardCount = 1)
{
return new PlayerAction(
"BigMoneyCartographer",
purchaseOrder: PurchaseOrder(card, cardCount),
actionOrder: ActionOrder(card));
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:BigMoneyCartographer.cs
示例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);
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:Strategy.cs
示例10: DiscardedCard
public void DiscardedCard(PlayerState playerState, Card card)
{
for (int i = 0; i < this.gameLogs.Length; ++i)
{
this.gameLogs[i].DiscardedCard(playerState, card);
}
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:GameLogMultiplexer.cs
示例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);
}
开发者ID:postcn,项目名称:Dominion,代码行数:25,代码来源:CardStackTest.cs
示例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));
}
开发者ID:peterhal,项目名称:Dominulator,代码行数:7,代码来源:BitMoneyFishingVillage.cs
示例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);
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:25,代码来源:BigMoneyWithCard.cs
示例14: AddNCardsToTop
public void AddNCardsToTop(Card card, int count)
{
for (int i = 0; i < count; ++i)
{
this.AddCardToTop(card);
}
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:ListOfCards.cs
示例15: ChooseBetweenTrashAndTopDeck
public override DeckPlacement ChooseBetweenTrashAndTopDeck(GameState gameState, Card card)
{
if (playerAction.gainOrder.DoesCardPickerMatch(gameState, card))
return DeckPlacement.TopOfDeck;
return DeckPlacement.Trash;
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:WatchTower.cs
示例16: Player
public Player(int id)
{
this.gain = false;
this.currencyForGain = 0;
this.currencyForGainBonus = 0;
this.gainsLeft = 0;
this.playMultipleTimes = false;
this.timesToPlayLeft = 1;
this.timesToPlayNextCard = 1;
this.id = id;
myDeck = new Deck();
myDeck.reshuffle();
myHand = new Hand();
for (int i = 0; i < 5; i++)
{
myHand.draw(myDeck);
}
timesPlayed = new List<int>();
played = new List<Card>();
victoryPts = 3;
this.buysLeft = 1;
this.currencyAvailable = 0;
this.actionsLeft = 1;
this.name = null;
this.game = null;
this.lastPlayedCard = null;
this.trashesNeeded = 0;
this.trashCurrencyBonus = 0;
this.bonusCurrencyForBuy = 0;
this.possibleTrashes = 0;
this.otherPlayers = new List<Player>();
this.functionsToCall = new Queue<DelayedFunction>();
this.thiefList = new List<List<Card>>();
}
开发者ID:postcn,项目名称:Dominion,代码行数:34,代码来源:Player.cs
示例17: GetCoinAmountToOverpayForCard
public override int GetCoinAmountToOverpayForCard(GameState gameState, Card card)
{
Card cardToOverpayFor = this.playerAction.purchaseOrder.GetPreferredCard(gameState, c => c.CurrentCoinCost(gameState.Self) <= gameState.Self.AvailableCoins);
if (cardToOverpayFor == null)
return 0;
return cardToOverpayFor.CurrentCoinCost(gameState.Self);
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:Stonemason.cs
示例18: DrewCardIntoHand
public void DrewCardIntoHand(PlayerState playerState, Card card)
{
for (int i = 0; i < this.gameLogs.Length; ++i)
{
this.gameLogs[i].DrewCardIntoHand(playerState, card);
}
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:GameLogMultiplexer.cs
示例19: ActionOrder
private static CardPickByPriority ActionOrder(Card withCard)
{
return new CardPickByPriority(
CardAcceptance.For(Cards.Rebuild, ShouldPlayRebuild),
new CardAcceptance(withCard)
);
}
开发者ID:peterhal,项目名称:Dominulator,代码行数:7,代码来源:RebuildAdvanced.cs
示例20: AddCardToTop
public void AddCardToTop(Card card)
{
if (card != null)
this.countKnownCard++;
this.cards.Add(card);
base.Add(card);
}
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:8,代码来源:ListOfCards.cs
注:本文中的Dominion.Card类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论