Interface IWeaponsDealer
-
- All Superinterfaces:
IPerson
- All Known Implementing Classes:
WeaponsDealerState
public interface IWeaponsDealer extends IPerson
Defines the person in the tavern dealing in weapons.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Jan 25, 2013
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javafx.beans.property.ReadOnlyIntegerProperty
amountAvailableProperty(EWeapon weapon)
Property representing the amount that can be bought from the dealer.int
move(IWeapon weapon, int amount)
Move ware into this holding.void
setCity(ICity city)
Set the city.
-
-
-
Method Detail
-
amountAvailableProperty
javafx.beans.property.ReadOnlyIntegerProperty amountAvailableProperty(EWeapon weapon)
Property representing the amount that can be bought from the dealer.- Parameters:
weapon
- that is to be sold- Returns:
- integer binding representing the amount of the weapon that can be bought.
-
move
int move(IWeapon weapon, int amount)
Move ware into this holding. The player may be null and is not used in this base implementation, but subclasses may be interested for statistical reasons. This method is thread save.- Parameters:
weapon
- to be movedamount
- of the ware that is moved- Returns:
- the effective amount that was moved. The amount may be positive if something was added, negative if the ware was removed from the holding or zero if nothing was moved.
-
setCity
void setCity(ICity city)
Set the city.- Parameters:
city
- in which the weapons dealer operates
-
-