Class Treasury

  • All Implemented Interfaces:
    ITreasury

    public class Treasury
    extends java.lang.Object
    implements ITreasury
    Author:
    Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 31, 2014
    • 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
    • Constructor Detail

      • Treasury

        public Treasury()
    • 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.
        Specified by:
        getCash in interface ITreasury
        Returns:
        cash in the treasury.
      • cashProperty

        public javafx.beans.property.LongProperty cashProperty()
        Specified by:
        cashProperty in interface ITreasury
      • 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 interface ITreasury
        Returns:
        current head tax value
      • paidTaxesProperty

        public javafx.beans.property.LongProperty paidTaxesProperty()
        Specified by:
        paidTaxesProperty in interface ITreasury
      • cityGuardCostsProperty

        public javafx.beans.property.IntegerProperty cityGuardCostsProperty()
        Specified by:
        cityGuardCostsProperty in interface ITreasury
      • buildingCostsProperty

        public javafx.beans.property.IntegerProperty buildingCostsProperty()
        Specified by:
        buildingCostsProperty in interface ITreasury
      • outriggerCostsProperty

        public javafx.beans.property.IntegerProperty outriggerCostsProperty()
        Specified by:
        outriggerCostsProperty in interface ITreasury
      • siegeCostsProperty

        public javafx.beans.property.IntegerProperty siegeCostsProperty()
        Specified by:
        siegeCostsProperty in interface ITreasury
      • otherCostsProperty

        public javafx.beans.property.IntegerProperty otherCostsProperty()
        Specified by:
        otherCostsProperty in interface ITreasury
      • otherIncomeProperty

        public javafx.beans.property.IntegerProperty otherIncomeProperty()
        Specified by:
        otherIncomeProperty in interface ITreasury
      • donationsProperty

        public javafx.beans.property.IntegerProperty donationsProperty()
        Specified by:
        donationsProperty in interface ITreasury
      • getCurrentHeadTaxValue

        public double getCurrentHeadTaxValue()
        Description copied from interface: ITreasury
        Retrieve the current height of the taxes.
        Specified by:
        getCurrentHeadTaxValue in interface ITreasury
        Returns:
        current head tax
      • getCurrentPropertyTax

        public double getCurrentPropertyTax()
        Description copied from interface: ITreasury
        Retrieve the current property tax.
        Specified by:
        getCurrentPropertyTax in interface ITreasury
        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 interface ITreasury
        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 interface ITreasury
        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 interface ITreasury
        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 interface ITreasury
        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 interface ITreasury
        Returns:
        costs for the outrigger
      • getSiegeCosts

        public int getSiegeCosts()
        Description copied from interface: ITreasury
        Paid ransom to prevent/abort siege.
        Specified by:
        getSiegeCosts in interface ITreasury
        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 interface ITreasury
        Returns:
        other costs.
      • getOtherIncome

        public int getOtherIncome()
        Description copied from interface: ITreasury
        All other income like donations.
        Specified by:
        getOtherIncome in interface ITreasury
        Returns:
        other income
      • getDonations

        public int getDonations()
        Description copied from interface: ITreasury
        All the donated amount.
        Specified by:
        getDonations in interface ITreasury
        Returns:
        donations