Class BalanceSheet

  • All Implemented Interfaces:
    IBalanceSheet

    public class BalanceSheet
    extends java.lang.Object
    implements IBalanceSheet
    Author:
    Andi Hotz, (c) Sahits GmbH, 2013 Created on Dec 9, 2013
    • Field Detail

      • city

        private final ICity city
      • player

        private final IPlayer player
      • gameDate

        @Autowired
        private Date gameDate
      • rentalIncome

        private int rentalIncome
      • rentalIncomeDays

        private int[] rentalIncomeDays
      • wageCosts

        private int wageCosts
      • wageCostsDays

        private int[] wageCostsDays
      • propertyTaxes

        private int propertyTaxes
      • officeTrading

        private int officeTrading
      • officeTradingDays

        private int[] officeTradingDays
      • stewardCost

        private int stewardCost
      • stewardCostsDays

        private int[] stewardCostsDays
      • otherCosts

        private int otherCosts
      • otherCostsDays

        private int[] otherCostsDays
    • Constructor Detail

      • BalanceSheet

        public BalanceSheet​(ICity city,
                            IPlayer player)
        Initialize a blank sheet
      • BalanceSheet

        public BalanceSheet​(BalanceSheet prevWeek)
        Initialize a forcast balance sheet by using the balance sheet of the previous week
        Parameters:
        prevWeek - BalanceSheet of the previous week.
    • Method Detail

      • updateStewardCosts

        public void updateStewardCosts​(int costPerDay)
        Update the costs for the steward.
        Specified by:
        updateStewardCosts in interface IBalanceSheet
        Parameters:
        costPerDay - daily salary costs of the stewards in all the trading offices.
      • updateRentalIncome

        public void updateRentalIncome​(int incomePerDay)
        Update the income for rented houses.
        Specified by:
        updateRentalIncome in interface IBalanceSheet
        Parameters:
        incomePerDay - amount payed per day
      • deductPropertyTaxes

        public void deductPropertyTaxes​(int amount)
        Update the property taxes for the whole week.
        Specified by:
        deductPropertyTaxes in interface IBalanceSheet
        Parameters:
        amount - property taxes for the week
      • updateSalaries

        public void updateSalaries​(int saleriesPerDay)
        Update the saleries per day.
        Specified by:
        updateSalaries in interface IBalanceSheet
        Parameters:
        saleriesPerDay - salery of workers per day
      • updateAutomatedTradingCosts

        public void updateAutomatedTradingCosts​(long costs)
        Update the costs incurred by automatic trading for the day
        Specified by:
        updateAutomatedTradingCosts in interface IBalanceSheet
        Parameters:
        costs - for automatic trading
      • updateOtherExpensesRegular

        public void updateOtherExpensesRegular​(int costsPerDay)
        Update any regular other costs.
        Specified by:
        updateOtherExpensesRegular in interface IBalanceSheet
        Parameters:
        costsPerDay - regular expences per day
      • updateOtherExpensesOneTime

        public void updateOtherExpensesOneTime​(int costs)
        Update the other costs with a one time expense.
        Specified by:
        updateOtherExpensesOneTime in interface IBalanceSheet
        Parameters:
        costs - one time expenses
      • getWeekIndex

        private int getWeekIndex()