本文整理汇总了C#中DominionBase.Players.Player.BeginDrawing方法的典型用法代码示例。如果您正苦于以下问题:C# Player.BeginDrawing方法的具体用法?C# Player.BeginDrawing怎么用?C# Player.BeginDrawing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DominionBase.Players.Player
的用法示例。
在下文中一共展示了Player.BeginDrawing方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
// Perform attack on every player (including you)
IEnumerator<Player> enumerator = player._Game.GetPlayersStartingWithEnumerator(player);
while (enumerator.MoveNext())
{
Player attackee = enumerator.Current;
// Skip if the attack is blocked (Moat, Lighthouse, etc.)
if (this.IsAttackBlocked[attackee])
continue;
if (attackee.CanDraw)
{
Card card = attackee.Draw(DeckLocation.Revealed);
Choice choice = new Choice(String.Format("Do you want to discard {0}'s {1} or put it back on top?", attackee.Name, card.Name), this, new CardCollection() { card }, new List<string>() { "Discard", "Put it back" }, attackee);
ChoiceResult result = player.MakeChoice(choice);
if (result.Options[0] == "Discard")
attackee.DiscardRevealed();
else
attackee.AddCardsToDeck(attackee.RetrieveCardsFrom(DeckLocation.Revealed), DeckPosition.Top);
}
}
player.BeginDrawing();
// Keep flipping cards until we hit a non-Action card, thus making the counts different
while (player.CanDraw && player.Revealed[Category.Action].Count == player.Revealed.Count)
player.Draw(DeckLocation.Revealed);
player.EndDrawing();
player.AddCardsToHand(DeckLocation.Revealed);
}
示例3: Play
public override void Play(Player player)
{
base.Play(player);
player.BeginDrawing();
while (player.CanDraw)
{
player.Draw(DeckLocation.Revealed);
if (player._Game.ComputeCost(player.Revealed.Last()) >= new Cost(3))
break;
}
player.EndDrawing();
if (player.Revealed.Count > 0)
{
Card lastCard = player.Revealed.Last();
if (player._Game.ComputeCost(player.Revealed.Last()) >= new Cost(3))
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, lastCard));
}
player.DiscardRevealed();
}
示例4: Play
public override void Play(Player player)
{
base.Play(player);
player.ReturnHand(player.RevealHand());
Boolean foundUniqueCard = false;
player.BeginDrawing();
while (player.CanDraw)
{
player.Draw(DeckLocation.Revealed);
if (player.Hand[player.Revealed.Last().CardType].Count == 0)
{
foundUniqueCard = true;
break;
}
}
player.EndDrawing();
if (foundUniqueCard && player.Revealed.Count > 0)
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, player.Revealed.Last()));
player.DiscardRevealed();
}
示例5: Play
public override void Play(Player player)
{
base.Play(player);
player.BeginDrawing();
while (player.Revealed[Category.Treasure].Count < 1 && player.CanDraw)
player.Draw(DeckLocation.Revealed);
player.EndDrawing();
CardCollection treasureCards = player.Revealed[c => (c.Category & Category.Treasure) == Category.Treasure];
if (treasureCards.Count > 0)
{
Card card = treasureCards[0];
Choice choice = new Choice(String.Format("You revealed a {0}.", card.Name), this, new CardCollection() { card }, new List<string>() { "Discard it", "Trash it" }, player);
ChoiceResult result = player.MakeChoice(choice);
if (result.Options[0] == "Discard it")
{
player.Discard(DeckLocation.Revealed, card);
}
else if (result.Options[0] == "Trash it")
{
player.Trash(player.RetrieveCardFrom(DeckLocation.Revealed, card));
}
}
player.DiscardRevealed();
}