Class BalanceSheet
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.impl.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 Summary
Fields Modifier and Type Field Description private ICity
city
private Date
gameDate
private int
officeTrading
private int[]
officeTradingDays
private int
otherCosts
private int[]
otherCostsDays
private IPlayer
player
private int
propertyTaxes
private int
rentalIncome
private int[]
rentalIncomeDays
private int
stewardCost
private int[]
stewardCostsDays
private int
wageCosts
private int[]
wageCostsDays
-
Constructor Summary
Constructors Constructor Description BalanceSheet(ICity city, IPlayer player)
Initialize a blank sheetBalanceSheet(BalanceSheet prevWeek)
Initialize a forcast balance sheet by using the balance sheet of the previous week
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deductPropertyTaxes(int amount)
Update the property taxes for the whole week.private int
getWeekIndex()
void
updateAutomatedTradingCosts(long costs)
Update the costs incurred by automatic trading for the dayvoid
updateOtherExpensesOneTime(int costs)
Update the other costs with a one time expense.void
updateOtherExpensesRegular(int costsPerDay)
Update any regular other costs.void
updateRentalIncome(int incomePerDay)
Update the income for rented houses.void
updateSalaries(int saleriesPerDay)
Update the saleries per day.void
updateStewardCosts(int costPerDay)
Update the costs for the steward.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.IBalanceSheet
getOfficeTrading, getOtherCosts, getPropertyTaxes, getRentalIncome, getStewardCost, getWageCosts
-
-
-
-
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(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 interfaceIBalanceSheet
- 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 interfaceIBalanceSheet
- Parameters:
incomePerDay
- amount payed per day
-
deductPropertyTaxes
public void deductPropertyTaxes(int amount)
Update the property taxes for the whole week.- Specified by:
deductPropertyTaxes
in interfaceIBalanceSheet
- Parameters:
amount
- property taxes for the week
-
updateSalaries
public void updateSalaries(int saleriesPerDay)
Update the saleries per day.- Specified by:
updateSalaries
in interfaceIBalanceSheet
- 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 interfaceIBalanceSheet
- Parameters:
costs
- for automatic trading
-
updateOtherExpensesRegular
public void updateOtherExpensesRegular(int costsPerDay)
Update any regular other costs.- Specified by:
updateOtherExpensesRegular
in interfaceIBalanceSheet
- 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 interfaceIBalanceSheet
- Parameters:
costs
- one time expenses
-
getWeekIndex
private int getWeekIndex()
-
-