MoveAllRevealedCardsToHand() private method

private MoveAllRevealedCardsToHand ( ) : void
return void
Ejemplo n.º 1
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.RevealCardsFromDeck(5, gameState);
     Card cardType = gameState.players.PlayerLeft.actions.BanCardToDrawnIntoHandFromRevealedCards(gameState);
     if (!currentPlayer.cardsBeingRevealed.HasCard(cardType))
     {
         throw new Exception("Must ban a card currently being revealed");
     }
     currentPlayer.MoveRevealedCardToDiscard(cardType, gameState);
     currentPlayer.MoveAllRevealedCardsToHand();
 }
Ejemplo n.º 2
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            Card revealedCard = currentPlayer.DrawAndRevealOneCardFromDeck(gameState);
            if (revealedCard.isTreasure)
            {
                currentPlayer.MoveAllRevealedCardsToHand();
            }
            else
            {
                currentPlayer.MoveRevealedCardToTopOfDeck();
            }

            if (revealedCard.isAction || revealedCard.isVictory)
            {
                currentPlayer.GainCardFromSupply(Cards.Magpie, gameState);
            }
        }
Ejemplo n.º 3
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.RequestPlayerInspectTopOfDeckForDiscard(currentPlayer, gameState);
     while (true)
     {
         Card card = currentPlayer.DrawAndRevealOneCardFromDeck(gameState);
         if (card == null || !card.isAction)
             break;
     }
     currentPlayer.MoveAllRevealedCardsToHand();
 }
Ejemplo n.º 4
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            Card cardType = currentPlayer.GuessCardTopOfDeck(gameState);

            Card revealedCard = currentPlayer.DrawAndRevealOneCardFromDeck();
            if (revealedCard != cardType)
            {
                currentPlayer.MoveAllRevealedCardsToHand();
            }
            else
            {
                currentPlayer.MoveRevealedCardsToDiscard(gameState);
            }
        }
Ejemplo n.º 5
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            int maxCoppers = currentPlayer.discard.CountWhere(card => card == Cards.Copper);
            int cardsToPutInHand = currentPlayer.actions.GetNumberOfCoppersToPutInHandForCountingHouse(gameState, maxCoppers);

            if (cardsToPutInHand < 0 || cardsToPutInHand > maxCoppers)
            {
                throw new Exception("Requested number of cards to reveal is out of range");
            }

            if (cardsToPutInHand > 0)
            {
                currentPlayer.RevealCardsFromDiscard(cardsToPutInHand, card => card == Cards.Copper);
                currentPlayer.MoveAllRevealedCardsToHand();
            }
        }
Ejemplo n.º 6
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.RevealCardsFromDeck(3);
     PlayerActionChoice choice = currentPlayer.RequestPlayerChooseBetween(gameState, actionChoice => actionChoice == PlayerActionChoice.Discard || actionChoice == PlayerActionChoice.PutInHand);
     switch (choice)
     {
         case PlayerActionChoice.Discard:
             {
                 currentPlayer.MoveRevealedCardsToDiscard(gameState);
                 currentPlayer.DrawAdditionalCardsIntoHand(3);
                 break;
             }
         case PlayerActionChoice.PutInHand:
             {
                 currentPlayer.MoveAllRevealedCardsToHand();
                 break;
             }
         default:
             throw new Exception();
     }
 }