本文整理汇总了C#中DominionBase.Players.Player.AddCardsToHand方法的典型用法代码示例。如果您正苦于以下问题:C# Player.AddCardsToHand方法的具体用法?C# Player.AddCardsToHand怎么用?C# Player.AddCardsToHand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DominionBase.Players.Player
的用法示例。
在下文中一共展示了Player.AddCardsToHand方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Play
public override void Play(Player player)
{
base.Play(player);
player.BeginDrawing();
while (player.Revealed[Category.Treasure].Count < 2 && player.CanDraw)
player.Draw(DeckLocation.Revealed);
player.EndDrawing();
player.AddCardsToHand(player.RetrieveCardsFrom(DeckLocation.Revealed, c => (c.Category & Category.Treasure) == Category.Treasure));
player.DiscardRevealed();
}
示例2: Play
public override void Play(Player player)
{
base.Play(player);
player.Draw(3, DeckLocation.Revealed);
IEnumerator<Player> enumerator = player._Game.GetPlayersStartingWithEnumerator(player);
enumerator.MoveNext(); // Gets us... which we don't care about here.
enumerator.MoveNext(); // Get the player to our left
Player leftPlayer = enumerator.Current;
Choice choice = new Choice(String.Format("Choose a card of {0}'s to discard", player), this, player.Revealed, player);
ChoiceResult result = leftPlayer.MakeChoice(choice);
// Discard the chosen card
if (result.Cards.Count > 0)
player.Discard(DeckLocation.Revealed, result.Cards[0]);
player.AddCardsToHand(DeckLocation.Revealed);
}
示例3: Play
public override void Play(Player player)
{
base.Play(player);
CardCollection newCards = player.Draw(4, DeckLocation.Revealed);
player.AddCardsToHand(player.RetrieveCardsFrom(DeckLocation.Revealed,
c => c.CardType == Universal.TypeClass.Copper || c.CardType == Alchemy.TypeClass.Potion));
Choice replaceChoice = new Choice("Choose order of cards to put back on your deck", this, player.Revealed, player, true, player.Revealed.Count, player.Revealed.Count);
ChoiceResult replaceResult = player.MakeChoice(replaceChoice);
player.RetrieveCardsFrom(DeckLocation.Revealed, replaceResult.Cards);
player.AddCardsToDeck(replaceResult.Cards, DeckPosition.Top);
}
示例4: Play
public override void Play(Player player)
{
base.Play(player);
CardCollection newCards = player.Draw(3, DeckLocation.Private);
Choice choice = new Choice(
String.Format("Do you want to discard {0} or put them back on top?", String.Join(" and ", newCards.Select(c => c.Name))),
this,
newCards,
new List<string>() { "Discard", "Put them into your hand" },
player);
ChoiceResult result = player.MakeChoice(choice);
if (result.Options[0] == "Discard")
{
player.Discard(DeckLocation.Private);
player.DrawHand(3);
}
else
{
player.AddCardsToHand(DeckLocation.Private);
}
}
示例5: Play
public override void Play(Player player)
{
base.Play(player);
int copperCount = player.DiscardPile.LookThrough(c => c.CardType == Cards.Universal.TypeClass.Copper).Count;
List<String> options = new List<string>();
for (int i = 0; i <= copperCount; i++)
options.Add(i.ToString());
Choice choice = new Choice("How many Copper cards would you like to reveal and put into your hand?", this, new CardCollection() { this }, options, player);
ChoiceResult result = player.MakeChoice(choice);
int number = int.Parse(result.Options[0]);
player.AddCardsInto(DeckLocation.Revealed, player.RetrieveCardsFrom(DeckLocation.Discard, Cards.Universal.TypeClass.Copper, number));
player.AddCardsToHand(DeckLocation.Revealed);
}
示例6: Play
public override void Play(Player player)
{
base.Play(player);
CardCollection newCards = player.Draw(4, DeckLocation.Revealed);
player.AddCardsToHand(player.RetrieveCardsFrom(DeckLocation.Revealed, Category.Victory));
Choice replaceChoice = new Choice("Choose order of cards to put back on your deck", this, player.Revealed, player, true, player.Revealed.Count, player.Revealed.Count);
ChoiceResult replaceResult = player.MakeChoice(replaceChoice);
player.RetrieveCardsFrom(DeckLocation.Revealed, replaceResult.Cards);
player.AddCardsToDeck(replaceResult.Cards, DeckPosition.Top);
}
示例7: Play
public override void Play(Player player)
{
base.Play(player);
Choice choice = new Choice("Choose one:", this, new CardCollection() { this }, new List<string>() { "Set aside the top card of your deck face down on your Native Village mat", "Put all the cards from your mat into your hand" }, player);
ChoiceResult result = player.MakeChoice(choice);
if (result.Options.Contains("Set aside the top card of your deck face down on your Native Village mat"))
{
if (player.CanDraw)
player.Draw(TypeClass.NativeVillageMat);
}
else
{
player.AddCardsToHand(player.RetrieveCardsFrom(TypeClass.NativeVillageMat));
}
}
示例8: PlayDuration
public override void PlayDuration(Player player)
{
base.PlayDuration(player);
if (_HavenedCards.Count > 0)
{
player.AddCardsToHand(_HavenedCards);
_HavenedCards.Clear();
}
}