public class WeaponsDealerState extends Object implements IWeaponsDealer
| Modifier and Type | Field and Description |
|---|---|
private IArmory |
armory |
private ArmoryRegistry |
armoryRegistry |
private static org.apache.logging.log4j.Logger |
LOGGER |
private DependentPropertyInitializer |
propertyInitializer |
private double |
sellValue |
| Constructor and Description |
|---|
WeaponsDealerState() |
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.ReadOnlyIntegerProperty |
amountAvailableProperty(EWeapon weapon)
Property representing the amount that can be bought from the dealer.
|
protected boolean |
containsWare(IWeapon weapons)
Check if there is an amountable object for this ware
|
private int |
getWeapon(IWeapon weapon)
Retrieve the amount of the weapon that belongs to the dealer.
|
void |
init() |
int |
move(IWeapon weapon,
int amount)
Move ware into this holding.
|
void |
setCity(ICity city)
Set the city.
|
private static final org.apache.logging.log4j.Logger LOGGER
@Autowired private DependentPropertyInitializer propertyInitializer
@DependentValue(value="tavern.weapons.dealer.sellvalue.factor") private double sellValue
@Autowired private ArmoryRegistry armoryRegistry
private IArmory armory
@PostConstruct public void init()
public int move(IWeapon weapon, int amount)
move in interface IWeaponsDealerweapon - to be movedamount - of the ware that is movedprotected final boolean containsWare(IWeapon weapons)
weapons - to be checkedprivate int getWeapon(IWeapon weapon)
weapon - type of weaponpublic javafx.beans.property.ReadOnlyIntegerProperty amountAvailableProperty(EWeapon weapon)
IWeaponsDealeramountAvailableProperty in interface IWeaponsDealerweapon - that is to be soldpublic void setCity(ICity city)
IWeaponsDealersetCity in interface IWeaponsDealerCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.