Class Company
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.impl.Company
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.LongPropertycashProperty()Retrieve the cash property.longgetCash()Retrieve the cash avalable to the companyvoidsetOwner(IPlayer player)voidupdateCash(long diff)Add or subtract some cash on the UI threadvoidupdateCashDirectly(long diff)Add or subtract some cash directly.-
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.ICompany
getCompanyValue, getHomeTown, setCompanyValue
-
-
-
-
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:ICompanyRetrieve the cash avalable to the company
-
updateCash
public void updateCash(long diff)
Add or subtract some cash on the UI thread- Specified by:
updateCashin interfaceICompany- 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:
updateCashDirectlyin interfaceICompany- Parameters:
diff- delta that is to be updated (positive or negative)
-
cashProperty
public javafx.beans.property.LongProperty cashProperty()
Description copied from interface:ICompanyRetrieve the cash property.- Specified by:
cashPropertyin interfaceICompany- Returns:
- property
-
-