Class Company

  • All Implemented Interfaces:
    ICompany

    public final class Company
    extends java.lang.Object
    implements ICompany
    • Constructor Detail

      • Company

        public Company​(ICity homeTown,
                       long cash,
                       long random)
    • Method Detail

      • setOwner

        public void setOwner​(IPlayer player)
      • getCash

        public long getCash()
        Description copied from interface: ICompany
        Retrieve the cash avalable to the company
        Specified by:
        getCash in interface ICompany
        Returns:
        cash amount available
      • updateCash

        public void updateCash​(long diff)
        Add or subtract some cash on the UI thread
        Specified by:
        updateCash in interface ICompany
        Parameters:
        diff - amount of money that is transferred
      • updateCashDirectly

        public void updateCashDirectly​(long diff)
        Add or subtract some cash directly. This method is intended for calls that do not originate in the UI.
        Specified by:
        updateCashDirectly in interface ICompany
        Parameters:
        diff - delta that is to be updated (positive or negative)
      • cashProperty

        public javafx.beans.property.LongProperty cashProperty()
        Description copied from interface: ICompany
        Retrieve the cash property.
        Specified by:
        cashProperty in interface ICompany
        Returns:
        property