Exemplo n.º 1
0
 /// <summary>
 /// The bank sell a hotel to the player
 /// </summary>
 /// <param name="p">Player</param>
 /// <param name="l">Land</param>
 public void SellHotel(Player p, Land l)
 {
     if (NbHotel > 0)
     {
         NbHotel--;
         l.AddHotel();
         BankAccount bankAccount   = GetBankAccount();
         BankAccount playerAccount = GetBankAccount(p);
         playerAccount.BankTransfer(bankAccount, l.LandGroup.HotelPrice);
     }
     else
     {
         throw new Exception();
     }
 }