public static BigDecimal calculateFee(Player player,int price){
  BigDecimal fee=BigDecimal.valueOf(price);
  fee=fee.multiply(BigDecimal.valueOf(TRADING_FEE_PERCENTAGE));
  if (player.isBadBoy()) {
    fee=fee.multiply(BigDecimal.valueOf(1 + TRADING_FEE_PLAYER_KILLER_PENALTY));
  }
  BigDecimal feeBonus=BigDecimal.ONE;
  feeBonus=BigDecimal.valueOf(Math.exp(-player.getTradescore() / FEE_BONUS_CONSTANT));
  fee=fee.multiply(feeBonus);
  return fee.max(BigDecimal.ONE);
}

public static BigDecimal calculateFee ( Player player , int price ) { BigDecimal fee = BigDecimal . valueOf ( price ) ; fee = fee . multiply ( BigDecimal . valueOf ( TRADING_FEE_PERCENTAGE ) ) ; if ( player . isBadBoy ( ) ) { fee = fee . multiply ( BigDecimal . valueOf ( 1 + TRADING_FEE_PLAYER_KILLER_PENALTY ) ) ; } BigDecimal feeBonus = BigDecimal . ONE ; feeBonus = BigDecimal . valueOf ( Math . exp ( - player . getTradescore ( ) / FEE_BONUS_CONSTANT ) ) ; fee = fee . multiply ( feeBonus ) ; return fee . max ( BigDecimal . ONE ) ; }
calculates the trading fee a player has to pay when selling for a certain price
