Class Treasury
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.city.cityhall.impl.Treasury
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.beans.property.IntegerProperty
buildingCosts
private javafx.beans.property.LongProperty
cash
private javafx.beans.property.IntegerProperty
cityGuardCosts
private CityProperties
cityProperties
private javafx.beans.property.DoubleProperty
currentHeadTaxValue
private javafx.beans.property.DoubleProperty
currentPropertyTax
private javafx.beans.property.IntegerProperty
donations
private javafx.beans.property.IntegerProperty
otherCosts
private javafx.beans.property.IntegerProperty
otherIncome
private javafx.beans.property.IntegerProperty
outriggerCosts
private javafx.beans.property.LongProperty
paidSpecialTaxes
private javafx.beans.property.LongProperty
paidTaxes
private javafx.beans.property.IntegerProperty
siegeCosts
-
Constructor Summary
Constructors Constructor Description Treasury()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDonations(int donations)
void
addOtherIncome(int otherIncome)
void
addPaidSpecialTaxes(long paidSpecialTaxes)
void
addPaidTaxes(long paidTaxes)
javafx.beans.property.IntegerProperty
buildingCostsProperty()
javafx.beans.property.LongProperty
cashProperty()
javafx.beans.property.IntegerProperty
cityGuardCostsProperty()
javafx.beans.property.DoubleProperty
currentHeadTaxValueProperty()
Double property for the current head tax value.javafx.beans.property.DoubleProperty
currentPropertyTaxProperty()
javafx.beans.property.IntegerProperty
donationsProperty()
int
getBuildingCosts()
Costs for the building of city walls and towers up to date.long
getCash()
Retrieve the whole amount in the treasury.int
getCityGuardCosts()
Monthly costs of the city guard.double
getCurrentHeadTaxValue()
Retrieve the current height of the taxes.double
getCurrentPropertyTax()
Retrieve the current property tax.int
getDonations()
All the donated amount.int
getOtherCosts()
Costs and fees that the city has to have payed up to this date in the current year.int
getOtherIncome()
All other income like donations.int
getOutriggerCosts()
Costs for paying the outrigger.long
getPaidSpecialTaxes()
Amount of the paid special taxes.long
getPaidTaxes()
Amount of the property and head taxes up to date this year.int
getSiegeCosts()
Paid ransom to prevent/abort siege.private void
init()
javafx.beans.property.IntegerProperty
otherCostsProperty()
javafx.beans.property.IntegerProperty
otherIncomeProperty()
javafx.beans.property.IntegerProperty
outriggerCostsProperty()
javafx.beans.property.LongProperty
paidSpecialTaxesProperty()
javafx.beans.property.LongProperty
paidTaxesProperty()
void
reset()
Reset all the moneytary values save cash back to 0.void
setCash(long cash)
void
setCurrentHeadTaxValue(double currentHeadTaxValue)
javafx.beans.property.IntegerProperty
siegeCostsProperty()
void
subtractBuildingCosts(int buildingCosts)
void
subtractCityGuardCosts(int cityGuardCosts)
void
subtractOtherCosts(int otherCosts)
void
subtractOutriggerCosts(int outriggerCosts)
void
subtractSiegeCosts(int siegeCosts)
-
-
-
Field Detail
-
currentHeadTaxValue
private javafx.beans.property.DoubleProperty currentHeadTaxValue
-
currentPropertyTax
private javafx.beans.property.DoubleProperty currentPropertyTax
-
paidTaxes
private javafx.beans.property.LongProperty paidTaxes
-
paidSpecialTaxes
private javafx.beans.property.LongProperty paidSpecialTaxes
-
cityGuardCosts
private javafx.beans.property.IntegerProperty cityGuardCosts
-
buildingCosts
private javafx.beans.property.IntegerProperty buildingCosts
-
outriggerCosts
private javafx.beans.property.IntegerProperty outriggerCosts
-
siegeCosts
private javafx.beans.property.IntegerProperty siegeCosts
-
otherCosts
private javafx.beans.property.IntegerProperty otherCosts
-
otherIncome
private javafx.beans.property.IntegerProperty otherIncome
-
donations
private javafx.beans.property.IntegerProperty donations
-
cash
private javafx.beans.property.LongProperty cash
-
cityProperties
@Autowired private CityProperties cityProperties
-
-
Method Detail
-
init
@PostConstruct private void init()
-
reset
public void reset()
Reset all the moneytary values save cash back to 0.
-
setCurrentHeadTaxValue
public void setCurrentHeadTaxValue(double currentHeadTaxValue)
-
addPaidTaxes
public void addPaidTaxes(long paidTaxes)
-
addPaidSpecialTaxes
public void addPaidSpecialTaxes(long paidSpecialTaxes)
-
subtractCityGuardCosts
public void subtractCityGuardCosts(int cityGuardCosts)
-
subtractBuildingCosts
public void subtractBuildingCosts(int buildingCosts)
-
subtractOutriggerCosts
public void subtractOutriggerCosts(int outriggerCosts)
-
subtractSiegeCosts
public void subtractSiegeCosts(int siegeCosts)
-
subtractOtherCosts
public void subtractOtherCosts(int otherCosts)
-
addOtherIncome
public void addOtherIncome(int otherIncome)
-
addDonations
public void addDonations(int donations)
-
getCash
public long getCash()
Description copied from interface:ITreasury
Retrieve the whole amount in the treasury.
-
cashProperty
public javafx.beans.property.LongProperty cashProperty()
- Specified by:
cashProperty
in interfaceITreasury
-
setCash
public void setCash(long cash)
-
currentHeadTaxValueProperty
public javafx.beans.property.DoubleProperty currentHeadTaxValueProperty()
Description copied from interface:ITreasury
Double property for the current head tax value.- Specified by:
currentHeadTaxValueProperty
in interfaceITreasury
- Returns:
- current head tax value
-
currentPropertyTaxProperty
public javafx.beans.property.DoubleProperty currentPropertyTaxProperty()
- Specified by:
currentPropertyTaxProperty
in interfaceITreasury
-
paidTaxesProperty
public javafx.beans.property.LongProperty paidTaxesProperty()
- Specified by:
paidTaxesProperty
in interfaceITreasury
-
paidSpecialTaxesProperty
public javafx.beans.property.LongProperty paidSpecialTaxesProperty()
- Specified by:
paidSpecialTaxesProperty
in interfaceITreasury
-
cityGuardCostsProperty
public javafx.beans.property.IntegerProperty cityGuardCostsProperty()
- Specified by:
cityGuardCostsProperty
in interfaceITreasury
-
buildingCostsProperty
public javafx.beans.property.IntegerProperty buildingCostsProperty()
- Specified by:
buildingCostsProperty
in interfaceITreasury
-
outriggerCostsProperty
public javafx.beans.property.IntegerProperty outriggerCostsProperty()
- Specified by:
outriggerCostsProperty
in interfaceITreasury
-
siegeCostsProperty
public javafx.beans.property.IntegerProperty siegeCostsProperty()
- Specified by:
siegeCostsProperty
in interfaceITreasury
-
otherCostsProperty
public javafx.beans.property.IntegerProperty otherCostsProperty()
- Specified by:
otherCostsProperty
in interfaceITreasury
-
otherIncomeProperty
public javafx.beans.property.IntegerProperty otherIncomeProperty()
- Specified by:
otherIncomeProperty
in interfaceITreasury
-
donationsProperty
public javafx.beans.property.IntegerProperty donationsProperty()
- Specified by:
donationsProperty
in interfaceITreasury
-
getCurrentHeadTaxValue
public double getCurrentHeadTaxValue()
Description copied from interface:ITreasury
Retrieve the current height of the taxes.- Specified by:
getCurrentHeadTaxValue
in interfaceITreasury
- Returns:
- current head tax
-
getCurrentPropertyTax
public double getCurrentPropertyTax()
Description copied from interface:ITreasury
Retrieve the current property tax.- Specified by:
getCurrentPropertyTax
in interfaceITreasury
- Returns:
- current proerty tax
-
getPaidTaxes
public long getPaidTaxes()
Description copied from interface:ITreasury
Amount of the property and head taxes up to date this year.- Specified by:
getPaidTaxes
in interfaceITreasury
- Returns:
- paid taxes for the current year
-
getPaidSpecialTaxes
public long getPaidSpecialTaxes()
Description copied from interface:ITreasury
Amount of the paid special taxes.- Specified by:
getPaidSpecialTaxes
in interfaceITreasury
- Returns:
- paid special taxes for the current year
-
getCityGuardCosts
public int getCityGuardCosts()
Description copied from interface:ITreasury
Monthly costs of the city guard.- Specified by:
getCityGuardCosts
in interfaceITreasury
- Returns:
- monthly costs for the city guards
-
getBuildingCosts
public int getBuildingCosts()
Description copied from interface:ITreasury
Costs for the building of city walls and towers up to date. This value is only positive if there is a building being built.- Specified by:
getBuildingCosts
in interfaceITreasury
- Returns:
- building costs for the city walls.
-
getOutriggerCosts
public int getOutriggerCosts()
Description copied from interface:ITreasury
Costs for paying the outrigger.- Specified by:
getOutriggerCosts
in interfaceITreasury
- Returns:
- costs for the outrigger
-
getSiegeCosts
public int getSiegeCosts()
Description copied from interface:ITreasury
Paid ransom to prevent/abort siege.- Specified by:
getSiegeCosts
in interfaceITreasury
- Returns:
- costs to prevent a siege.
-
getOtherCosts
public int getOtherCosts()
Description copied from interface:ITreasury
Costs and fees that the city has to have payed up to this date in the current year. Included here are also stolen amounts.- Specified by:
getOtherCosts
in interfaceITreasury
- Returns:
- other costs.
-
getOtherIncome
public int getOtherIncome()
Description copied from interface:ITreasury
All other income like donations.- Specified by:
getOtherIncome
in interfaceITreasury
- Returns:
- other income
-
getDonations
public int getDonations()
Description copied from interface:ITreasury
All the donated amount.- Specified by:
getDonations
in interfaceITreasury
- Returns:
- donations
-
-