RequestPlayerTrashLookedAtCard() private method

private RequestPlayerTrashLookedAtCard ( GameState gameState ) : void
gameState GameState
return void
Exemplo n.º 1
0
        public override void OverpayOnPurchase(PlayerState currentPlayer, GameState gameState, int overpayAmount)
        {
            for (int i = 0; i < overpayAmount; ++i)
            {
                if (!currentPlayer.deck.Any())
                    break;

                currentPlayer.LookAtCardsFromDeck(1, gameState);

                DeckPlacement deckPlacement = currentPlayer.actions.ChooseBetweenTrashTopDeckDiscard(gameState, currentPlayer.CardsBeingLookedAt.SomeCard());

                switch (deckPlacement)
                {
                    case DeckPlacement.Trash:
                        currentPlayer.RequestPlayerTrashLookedAtCard(gameState);
                        break;
                    case DeckPlacement.Discard:
                        currentPlayer.MoveLookedAtCardsToDiscard(gameState);
                        break;
                    case DeckPlacement.Deck:
                        currentPlayer.MoveLookedAtCardToTopOfDeck();
                        break;
                    default:
                        throw new Exception("Invalid option");
                }
            }
        }
Exemplo n.º 2
0
        public override void OverpayOnPurchase(PlayerState currentPlayer, GameState gameState, int overpayAmount)
        {
            for (int i = 0; i < overpayAmount; ++i)
            {
                if (!currentPlayer.deck.Any())
                    break;

                currentPlayer.LookAtCardsFromDeck(1);

                PlayerActionChoice choice = currentPlayer.RequestPlayerChooseBetween(gameState,
                    acceptableChoice => acceptableChoice == PlayerActionChoice.Trash ||
                                        acceptableChoice == PlayerActionChoice.Discard ||
                                        acceptableChoice == PlayerActionChoice.TopDeck);

                switch (choice)
                {
                    case PlayerActionChoice.Trash:
                        currentPlayer.RequestPlayerTrashLookedAtCard(gameState);
                        break;
                    case PlayerActionChoice.Discard:
                        currentPlayer.MoveLookedAtCardsToDiscard(gameState);
                        break;
                    case PlayerActionChoice.TopDeck:
                        currentPlayer.MoveLookedAtCardToTopOfDeck();
                        break;
                    default:
                        throw new Exception("Unhandled case");
                }
            }
        }