Esempio n. 1
0
 internal void RequestPlayerOverpayForCard(Card boughtCard, GameState gameState)
 {
     int overPayAmount = this.actions.GetCoinAmountToOverpayForCard(gameState, boughtCard);
     if (this.AvailableCoins < overPayAmount)
     {
         throw new Exception("Player requested to overpay by more than he can afford");
     }
     if (overPayAmount > 0)
     {
         this.gameLog.PlayerOverpaidForCard(boughtCard, overPayAmount);
         this.gameLog.PushScope();
         this.AddCoins(-overPayAmount);
         boughtCard.OverpayOnPurchase(this, gameState, overPayAmount);
         this.gameLog.PopScope();
     }
 }