public class InformantState extends BaseTavernPerson implements IInformant
isPresentPropertyisPresentProperty| Modifier and Type | Field and Description |
|---|---|
private static RandomNameLoader |
firstNameLoader |
private static RandomNameLoader |
lastNameLoader |
private String |
name |
private Optional<ch.sahits.datastructure.GenericPair<String,ICity>> |
pirateLocation |
private int |
price |
private Random |
rnd |
private boolean |
showMapIfAvailable |
private Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
wareNeeded |
private Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
wareSurplus |
| Constructor and Description |
|---|
InformantState() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
setNeededWare(ICity city,
IWare ware)
Set the information about the needed ware in the city.
|
void |
setPirateLocation(ISeaPirate pirate,
ICity city)
Set the location of the pirate.
|
void |
setWareSurplus(ICity city,
IWare ware)
Set the information about the surplus ware in the city
|
arrive, getNumberOfDaysSinceArrival, isPresent, isPresentProperty, leaveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getPirateLocation, getWareNeeded, getWareSurplus, isShowMapIfAvailable, setName, setPrice, setShowMapIfAvailablearrive, getArrivalDate, getMaxDaysAbsent, getMaxDaysPresent, getNumberOfDaysSinceArrival, isPresent, isPresentProperty, leave, setCity@Autowired private Random rnd
private int price
private String name
private boolean showMapIfAvailable
private static RandomNameLoader firstNameLoader
private static RandomNameLoader lastNameLoader
public int getPrice(IPlayer player)
IInformantgetPrice in interface IInformantplayer - requesting the pricepublic Optional<MapSegmentedImage> getMapSectionPart(IPlayer player)
IInformantgetMapSectionPart in interface IInformantplayer - requesting playerpublic void setPirateLocation(ISeaPirate pirate, ICity city)
IInformantsetPirateLocation in interface IInformantpublic void setNeededWare(ICity city, IWare ware)
IInformantsetNeededWare in interface IInformantpublic void setWareSurplus(ICity city, IWare ware)
IInformantsetWareSurplus in interface IInformantCopyright © 2011-2017 Sahits GmbH. All Rights Reserved.