Interface IInformant
-
- All Superinterfaces:
IPerson,ITavernPerson
- All Known Implementing Classes:
InformantState
public interface IInformant extends ITavernPerson
Provide the information the informant is willing to sell. The bits of information are optional, but one bit is always present.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Jan 24, 2013
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<MapSegmentedImage>getMapSectionPart(IPlayer player)The informant may also hold a map part for the player.java.lang.StringgetName()Retreive the name of the informantjava.util.Optional<ch.sahits.datastructure.GenericPair<java.lang.String,ICity>>getPirateLocation()Possible information about the location of a pirate.intgetPrice(IPlayer player)Get the price of the information.java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>>getWareNeeded()Possible information about in which city which ware is needed.java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>>getWareSurplus()Possible information about in which city which ware is available in surplus.booleanisShowMapIfAvailable()Indicate if the informant has a piece of a map.voidsetName(java.lang.String name)Set the name of the informantvoidsetNeededWare(ICity city, IWare ware)Set the information about the needed ware in the city.voidsetPirateLocation(ISeaPirate pirate, ICity city)Set the location of the pirate.voidsetPrice(int price)Set the price of the informationvoidsetShowMapIfAvailable(boolean showMapIfAvailable)Set the flag for the map piecevoidsetWareSurplus(ICity city, IWare ware)Set the information about the surplus ware in the city-
Methods inherited from interface ch.sahits.game.openpatrician.model.people.ITavernPerson
arrive, getArrivalDate, getMaxDaysAbsent, getMaxDaysPresent, getNumberOfDaysSinceArrival, isPresent, isPresentProperty, leave, setCity
-
-
-
-
Method Detail
-
getPrice
int getPrice(IPlayer player)
Get the price of the information.- Parameters:
player- requesting the price- Returns:
- price tag for the information
-
getName
java.lang.String getName()
Retreive the name of the informant- Returns:
- name of the informant.
-
getWareNeeded
java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> getWareNeeded()
Possible information about in which city which ware is needed.- Returns:
- Optional
GenericPairof city and ware for missing wares.
-
getWareSurplus
java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> getWareSurplus()
Possible information about in which city which ware is available in surplus.- Returns:
- Optional
GenericPairof city and ware whith surplus of ware.
-
getPirateLocation
java.util.Optional<ch.sahits.datastructure.GenericPair<java.lang.String,ICity>> getPirateLocation()
Possible information about the location of a pirate.- Returns:
- Optional
GenericPairof pirate name and city where the pirate is rumored to be.
-
setNeededWare
void setNeededWare(ICity city, IWare ware)
Set the information about the needed ware in the city.- Parameters:
city- which needs wareware- that is needed
-
setWareSurplus
void setWareSurplus(ICity city, IWare ware)
Set the information about the surplus ware in the city- Parameters:
city- which has surplus on waresware- that is available in abundance
-
setPirateLocation
void setPirateLocation(ISeaPirate pirate, ICity city)
Set the location of the pirate.- Parameters:
pirate- for whom there is information availablecity- near which the pirate has been seen.
-
getMapSectionPart
java.util.Optional<MapSegmentedImage> getMapSectionPart(IPlayer player)
The informant may also hold a map part for the player.- Parameters:
player- requesting player- Returns:
- Optional of the
MapSegmentedImage. Empty if there is no map segment for hteplayer
-
isShowMapIfAvailable
boolean isShowMapIfAvailable()
Indicate if the informant has a piece of a map.- Returns:
- true if the informant sells a piece of a map.
-
setShowMapIfAvailable
void setShowMapIfAvailable(boolean showMapIfAvailable)
Set the flag for the map piece- Parameters:
showMapIfAvailable- true if the informant has a map piece
-
setPrice
void setPrice(int price)
Set the price of the information- Parameters:
price- of hte information
-
setName
void setName(java.lang.String name)
Set the name of the informant- Parameters:
name- of the informant
-
-