RevealHand() private method

private RevealHand ( ) : void
return void
コード例 #1
0
ファイル: BaseSet.cs プロジェクト: NathanTeeuwen/Dominulator
 public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState)
 {
     CardPredicate acceptableCard = card => card.isVictory;
     Card cardTopDecked = otherPlayer.RequestPlayerTopDeckCardFromHand(gameState, acceptableCard, isOptional: false);
     if (cardTopDecked == null)
     {
         otherPlayer.RevealHand();
     }
     else
     {
         otherPlayer.RevealCard(cardTopDecked, DeckPlacement.TopOfDeck);
     }
 }
コード例 #2
0
        internal bool RequestPlayerDiscardCardFromOtherPlayersHand(GameState gameState, PlayerState otherPlayer)
        {
            if (!otherPlayer.hand.Any)
            {
                return false;
            }
            otherPlayer.RevealHand();

            Card cardTypeToDiscard = this.actions.GetCardFromOtherPlayersHandToDiscard(gameState, otherPlayer);
            if (cardTypeToDiscard == null)
            {
                {
                    throw new Exception("Player must choose a card to discard");
                }
            }

            otherPlayer.MoveCardFromHandToDiscard(cardTypeToDiscard, gameState);

            return true;
        }
コード例 #3
0
ファイル: Seaside.cs プロジェクト: peterhal/Dominulator
 public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState)
 {
     if (!otherPlayer.RequestPlayerDiscardCardFromHand(gameState, card => card == Copper.card, isOptional: false))
     {
         otherPlayer.RevealHand();
     }
 }
コード例 #4
0
ファイル: Cornucopia.cs プロジェクト: peterhal/Dominulator
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.RevealHand();

            if (currentPlayer.hand.HasDuplicates())
            {
                currentPlayer.DrawOneCardIntoHand();
            }
            else
            {
                currentPlayer.DrawAdditionalCardsIntoHand(3);
            }
        }
コード例 #5
0
ファイル: Cornucopia.cs プロジェクト: peterhal/Dominulator
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.RevealHand();

            Card revealedCard = currentPlayer.DrawAndRevealOneCardFromDeck();
            while (revealedCard != null)
            {
                if (!currentPlayer.Hand.HasCard(revealedCard))
                {
                    currentPlayer.MoveRevealedCardToHand(revealedCard);
                    break;
                }
                revealedCard = currentPlayer.DrawAndRevealOneCardFromDeck();
            }

            currentPlayer.MoveRevealedCardsToDiscard(gameState);
        }
コード例 #6
0
ファイル: Intrigue.cs プロジェクト: peterhal/Dominulator
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.RevealHand();
     if (!currentPlayer.hand.Where(card => card.isAction).Any())
     {
         currentPlayer.DrawAdditionalCardsIntoHand(2);
     }
 }
コード例 #7
0
ファイル: DarkAges.cs プロジェクト: peterhal/Dominulator
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.GainCardFromSupply(Cards.Rats, gameState);
     CardPredicate cardsToTrash = card => card != Rats.card;
     if (currentPlayer.Hand.HasCard(cardsToTrash))
     {
         currentPlayer.RequestPlayerTrashCardFromHand(gameState, cardsToTrash, isOptional: false);
     }
     else
     {
         currentPlayer.RevealHand();
     }
 }
コード例 #8
0
ファイル: DarkAges.cs プロジェクト: peterhal/Dominulator
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.RevealHand();

            currentPlayer.AddCoins(0 - currentPlayer.Hand.CountWhere(card => card.isTreasure));
        }