Dominion.PlayerState.RequestPlayerInspectTopOfDeckForDiscard C# (CSharp) Method

RequestPlayerInspectTopOfDeckForDiscard() private method

private RequestPlayerInspectTopOfDeckForDiscard ( PlayerState decidingPlayer, GameState gameState, bool shouldReveal = true ) : void
decidingPlayer PlayerState
gameState GameState
shouldReveal bool
return void
        internal void RequestPlayerInspectTopOfDeckForDiscard(PlayerState decidingPlayer, GameState gameState, bool shouldReveal = true)
        {
            Card movedCard = shouldReveal ? this.DrawAndRevealOneCardFromDeck(gameState) : this.DrawAndLookAtOneCardFromDeck(gameState);
            if (movedCard == null)
                return;
            gameState.gameLog.PushScope();
            if (decidingPlayer.actions.ShouldPlayerDiscardCardFromDeck(gameState, this, movedCard))
            {
                if (shouldReveal)
                {
                    this.MoveRevealedCardToDiscard(movedCard, gameState);
                }
                else
                {
                    this.MoveLookedAtCardsToDiscard(gameState);
                }
            }
            else
            {
                if (shouldReveal)
                {
                    this.MoveRevealedCardToTopOfDeck();
                }
                else
                {
                    this.MoveLookedAtCardToTopOfDeck();
                }
            }
            gameState.gameLog.PopScope();
        }

Usage Example

Ejemplo n.º 1
0
 public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState)
 {
     otherPlayer.RequestPlayerInspectTopOfDeckForDiscard(currentPlayer, gameState);
 }
All Usage Examples Of Dominion.PlayerState::RequestPlayerInspectTopOfDeckForDiscard
PlayerState