public class InformantState extends BaseTavernPerson implements IInformant, IUpdateableState
isPresentPropertyisPresentProperty| Modifier and Type | Field and Description |
|---|---|
private CitiesState |
cityState |
private CityUtilities |
cityUtils |
private static RandomNameLoader |
firstNameLoader |
private static RandomNameLoader |
lastNameLoader |
private IMap |
map |
private String |
name |
private com.google.common.base.Optional<GenericPair<String,ICity>> |
pirateLocation |
private SeaPiratesState |
pirateState |
private int |
price |
private Random |
rnd |
private boolean |
showMapIfAvailable |
private com.google.common.base.Optional<GenericPair<ICity,IWare>> |
wareNeeded |
private com.google.common.base.Optional<GenericPair<ICity,IWare>> |
wareSurplus |
| Constructor and Description |
|---|
InformantState() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<MapSegmentedImage> |
getMapSectionPart(IPlayer player)
The informant may also hold a map part for the player.
|
int |
getPrice(IPlayer player)
Get the price of the information.
|
private void |
setNeededWare(ICity city,
IWare ware)
Set the information about the needed ware in the city.
|
private void |
setPirateLocation(ISeaPirate pirate,
ICity city)
Set the location of the pirate.
|
private void |
setWareSurplus(ICity city,
IWare ware)
Set the information about the surplus ware in the city
|
void |
update()
Update the informant with new pieces of information
|
private void |
updateWareNeedOrSurplus(int val) |
arrive, getNumberOfDaysSinceArrival, isPresent, isPresentProperty, leaveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getPirateLocation, getWareNeeded, getWareSurplusarrive, getArrivalDate, getMaxDaysAbsent, getMaxDaysPresent, getNumberOfDaysSinceArrival, isPresent, isPresentProperty, leave, setCity@Autowired private Random rnd
@Autowired private SeaPiratesState pirateState
@Autowired private CitiesState cityState
@Autowired private CityUtilities cityUtils
@Autowired private IMap map
private int price
private String name
private com.google.common.base.Optional<GenericPair<ICity,IWare>> wareNeeded
private com.google.common.base.Optional<GenericPair<ICity,IWare>> wareSurplus
private com.google.common.base.Optional<GenericPair<String,ICity>> pirateLocation
private boolean showMapIfAvailable
private static RandomNameLoader firstNameLoader
private static RandomNameLoader lastNameLoader
public void update()
update in interface IUpdateableStatepublic int getPrice(IPlayer player)
IInformantgetPrice in interface IInformantplayer - requesting the priceprivate void setNeededWare(ICity city, IWare ware)
city - ware - private void setWareSurplus(ICity city, IWare ware)
city - ware - private void setPirateLocation(ISeaPirate pirate, ICity city)
pirate - city - private void updateWareNeedOrSurplus(int val)
public com.google.common.base.Optional<MapSegmentedImage> getMapSectionPart(IPlayer player)
IInformantgetMapSectionPart in interface IInformantplayer - requesting playerCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.