| Modifier and Type | Method and Description |
|---|---|
ICity |
IMap.findCity(javafx.geometry.Point2D location)
Find the city at the given coordinates.
|
ICity |
IMap.findCity(String cityName)
Find a city by its name.
|
ICity |
ILandBridge.getFrom() |
ICity |
ICitizen.getHometown()
Retreive the hometown of the citizen.
|
ICity |
ICompany.getHomeTown()
Retrieve the home town of the company
|
ICity |
ILandBridge.getTo() |
| Modifier and Type | Method and Description |
|---|---|
List<ICity> |
IMap.getCities()
Retrieve an unmodifiable list of all the cities in the map
|
List<ICity> |
IMap.getCities(IPlayer player)
Retrieve an unmodifiable list of all the cities in the map also including the once only visible to the player.
|
| Modifier and Type | Method and Description |
|---|---|
void |
IMap.buildSettlement(ICity city,
IPlayer player)
Add the settlement for the player.
|
IAIPlayer |
GameFactory.createAIPlayer(ICity homeTown,
long cash)
Create an artifiacial player instance.
|
ICompany |
GameFactory.createCompany(IPlayer owner,
ICity homeTown,
long cash) |
IHumanPlayer |
GameFactory.createPlayer(String name,
String lastName,
ICity homeTown,
boolean male,
int cash)
Create a human player instance.
|
List<IBuilding> |
IPlayer.findBuildings(ICity city)
Find all buildings of the player in the city
|
<T extends IBuilding> |
IPlayer.findBuildings(ICity city,
Class<T> buildingClass)
Find all buildings in the city that are some subtype of the indicated class
|
List<INavigableVessel> |
IPlayer.findShips(ICity city)
Find all ships in a city
|
ITradingOffice |
IPlayer.findTradingOffice(ICity city)
Find the trading office of the player in the city.
|
CityState |
GameFactory.getCityState(ICity city)
Retrieve the city state for the city.
|
private CityState |
GameFactory.initCityPropertyState(ICity city) |
void |
IMap.settlementBecomesTown(ICity city)
A founded settlement is complete and becomes a town.
|
| Modifier and Type | Method and Description |
|---|---|
ICity |
ITradingOffice.getCity()
Retrieve the city the trading office is located in.
|
| Modifier and Type | Field and Description |
|---|---|
private ICity |
TradingOffice.city
Reference to the city the trading office is located in
|
private ICity |
Storage.city |
| Constructor and Description |
|---|
Storage(IPlayer owner,
ICity city) |
TradingOffice(IPlayer player,
ICity city,
int value) |
| Modifier and Type | Field and Description |
|---|---|
private static ConcurrentHashMap<String,ICity> |
CityFactory.createdCityCache
Cache storing the already created cities to avoid duplicate creation
|
| Modifier and Type | Method and Description |
|---|---|
private ICity |
CityFactory.createCity(ch.sahits.game.openpatrician.data.map.City city) |
ICity |
CityFactory.createCityByName(String cityName)
Create a standard city based on its name
|
ICity |
CityFactory.createFutureCity(FoundNewSettlement city) |
ICity |
ILoaner.getCity()
Retrieve the city the loaner belongs to.
|
ICity |
IShipyard.getCity()
Retrieve the city the shipyard belongs to.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<ICity> |
CityFactory.getCities()
Retrieve all cities from the internal cache.
|
| Modifier and Type | Method and Description |
|---|---|
int |
BuildingProduction.getConsumption(IWare ware,
ICity city,
IPlayer player)
Retrieve the amount of ware that all the workshops of a player consume within a week
|
int |
BuildingProduction.getProduction(IWare ware,
ICity city,
IPlayer player)
Compute the total amount of ware the player produces in the city within a week
|
int |
BuildingProduction.getTotalConsumtion(IWare ware,
ICity city)
Retrieve the amount the workshops consume to produce the ware within a week
|
int |
BuildingProduction.getTotalProduction(IWare ware,
ICity city)
Compute the total amount of ware that is produced in the city within a week
|
double |
PopulationConsume.getWeeklyConsumption(IWare ware,
ICity city)
Calculate the weekly overall consumption of a ware in a city.
|
| Modifier and Type | Method and Description |
|---|---|
ICity |
ICityViolation.getCity()
City that violated the customs.
|
ICity |
ICityHall.getCity()
Retrieve the city belonging to this city hall
|
ICity |
IHelpCity.getCity()
Retrieve the city that should be helped.
|
ICity |
ICityHallNotice.getDestination()
Destination to deliver the ware to.
|
ICity |
IBuildLandPassage.getFromCity()
Retrieve an endpoint of the passage.
|
ICity |
IBuildLandPassage.getToCity()
Retrieve an endpoint of the passage.
|
| Modifier and Type | Field and Description |
|---|---|
private ICity |
HelpCity.city |
private ICity |
CityViolation.city |
private ICity |
CityHall.city |
private ICity |
CityHallNotice.destination |
private ICity |
BuildLandPassage.fromCity |
private ICity |
BuildLandPassage.toCity |
| Constructor and Description |
|---|
BuildLandPassage(int duration,
ICity fromCity,
ICity toCity) |
CityViolation(ICity city,
org.joda.time.DateTime date) |
CustomsViolation(ICity city,
org.joda.time.DateTime dateTime) |
HelpCity(int duration,
ICity city) |
PirateSupportViolation(ICity city,
org.joda.time.DateTime date) |
PlunderTradingOfficeViolation(ICity city,
org.joda.time.DateTime date) |
SpecialTaxViolation(ICity city,
org.joda.time.DateTime date) |
| Modifier and Type | Class and Description |
|---|---|
class |
City
Implementation of the city model.
|
| Modifier and Type | Field and Description |
|---|---|
private ICity |
ShipyardState.city |
private ICity |
CityState.city
Reference to the city model that is driven by this engine
|
private ICity |
LoanerState.city |
private ICity |
TavernState.city |
| Modifier and Type | Field and Description |
|---|---|
private ConcurrentHashMap<ICity,CityState> |
CitiesState.cities
List of all the cities coupled with their state to be handeld by this engine
|
| Modifier and Type | Method and Description |
|---|---|
Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
CitiesState.findCityWithMostNeededWare()
Find a possible city that has needed wares.
|
Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
CitiesState.findCityWithSurplusWare()
Find a possible city that has needed wares.
|
| Constructor and Description |
|---|
CityState(ICity city) |
LoanerState(ICity city) |
ShipyardState(ICity city) |
TavernState(ICity city) |
| Modifier and Type | Field and Description |
|---|---|
private ICity |
PersonLeavesTavernEvent.city |
private ICity |
RemitLoanEvent.city |
private ICity |
LoanGivingEvent.city |
private ICity |
BuildingFinished.city |
| Constructor and Description |
|---|
PersonLeavesTavernEvent(ICity city,
IPerson person) |
| Modifier and Type | Method and Description |
|---|---|
ICitizen |
StateFactory.createCitizen(ICity hometown,
ESocialRank rank) |
ICityHall |
StateFactory.createCityHall(ICity city) |
BalanceSheet |
PlayerInteractionFactory.createInitialBalanceSheet(ICity city,
IPlayer player)
Create an initial balance sheet for player in city.
|
ILoaner |
StateFactory.createLoaner(ICity city) |
Reputation |
PlayerInteractionFactory.createReputation(ICity city,
IPlayer player) |
IShipyard |
StateFactory.createShipYard(ICity city) |
IStorage |
BuildingFactory.createStorage(IPlayer owner,
ICity city) |
TavernState |
StateFactory.createTavernState(ICity city) |
ITradingOffice |
BuildingFactory.createTradingOffice(IPlayer owner,
ICity city,
int value) |
| Modifier and Type | Field and Description |
|---|---|
private ICity |
BalanceSheet.city |
private ICity |
LandBridge.from |
private ICity |
Citizen.hometown |
private ICity |
Company.homeTown |
private ICity |
LandBridge.to |
| Modifier and Type | Field and Description |
|---|---|
private LinkedList<ICity> |
GameMap.cities |
private com.google.common.collect.Multimap<IPlayer,ICity> |
GameMap.townsInFounding |
| Modifier and Type | Method and Description |
|---|---|
ICity |
GameMap.findCity(javafx.geometry.Point2D location) |
ICity |
GameMap.findCity(String cityName) |
ICity |
Player.getHometown() |
| Modifier and Type | Method and Description |
|---|---|
List<ICity> |
GameMap.getCities() |
List<ICity> |
GameMap.getCities(IPlayer player) |
| Modifier and Type | Method and Description |
|---|---|
void |
GameMap.buildSettlement(ICity city,
IPlayer player) |
List<IBuilding> |
Player.findBuildings(ICity city) |
<T extends IBuilding> |
Player.findBuildings(ICity city,
Class<T> buildingClass) |
List<INavigableVessel> |
Player.findShips(ICity city) |
ITradingOffice |
Player.findTradingOffice(ICity city) |
private static PersonalData |
AIPlayer.getPersonalData(ICity homeTown,
org.joda.time.DateTime birthDate) |
void |
GameMap.settlementBecomesTown(ICity city) |
| Modifier and Type | Method and Description |
|---|---|
void |
GameMap.setup(Date date,
Collection<ICity> cities,
javafx.geometry.Dimension2D dim,
String mapName,
String bwImageName,
double numberOfPixelPerKilometer)
Initialize the map by means of a list of its cities.
|
| Constructor and Description |
|---|
AIPlayer(ICity homeTown,
long cash,
org.joda.time.DateTime birthDate,
GameFactory gameFactory) |
BalanceSheet(ICity city,
IPlayer player)
Initialize a blank sheet
|
Company(IPlayer owner,
ICity homeTown,
long cash) |
HumanPlayer(ICity homeTown,
IPersonalData personalData,
long cash,
ESocialRank rank,
GameFactory gameFactory) |
Player(ICity homeTown,
IPersonalData personalData,
long cash,
ESocialRank rank,
GameFactory gameFactory) |
| Modifier and Type | Method and Description |
|---|---|
ICity |
IBaseTraveler.getDestination() |
ICity |
ITransportTrader.getDestination()
Destination city the trader has to get to.
|
ICity |
ITraveler.getDestination()
Get the destination city for the traveler.
|
ICity |
IFugitive.getDestination()
Get the destination city for the traveler.
|
ICity |
IEscorte.getDestination()
Get the destination city for the traveler.
|
ICity |
ISmuggler.getDestination()
Destination city.
|
ICity[] |
IBasePatrol.getDestinations()
Retrieve the destinations
|
| Modifier and Type | Method and Description |
|---|---|
Optional<ch.sahits.datastructure.GenericPair<String,ICity>> |
IInformant.getPirateLocation()
Possible information about the location of a pirate.
|
Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
IInformant.getWareNeeded()
Possible information about in which city which ware is needed.
|
Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
IInformant.getWareSurplus()
Possible information about in which city which ware is available in surplus.
|
| Modifier and Type | Method and Description |
|---|---|
int |
ReputationCalculator.calculateWareRepputation(ICity city,
IPlayer player)
Check each ware if the player contributes and what amount.
|
void |
ITavernPerson.setCity(ICity city)
Set the city of the tavern in which the person is located.
|
void |
IBaseTraveler.setDestination(ICity destination) |
void |
ITransportTrader.setDestination(ICity destination) |
void |
ISmuggler.setDestination(ICity destination) |
void |
IBasePatrol.setDestinations(ICity[] cities)
Set the destination city of the patrol.
|
void |
IInformant.setNeededWare(ICity city,
IWare ware)
Set the information about the needed ware in the city.
|
void |
IInformant.setPirateLocation(ISeaPirate pirate,
ICity city)
Set the location of the pirate.
|
void |
IInformant.setWareSurplus(ICity city,
IWare ware)
Set the information about the surplus ware in the city
|
| Modifier and Type | Field and Description |
|---|---|
private ICity |
BaseTavernPerson.city |
private ICity |
SmugglerState.destination |
private ICity |
BaseTravelerState.destination |
private ICity |
TransportTraderState.destination |
protected ICity[] |
BasePatrolState.destinations |
private ICity |
CaptainTownMapping.town |
| Modifier and Type | Field and Description |
|---|---|
private Optional<ch.sahits.datastructure.GenericPair<String,ICity>> |
InformantState.pirateLocation |
private Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
InformantState.wareNeeded |
private Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
InformantState.wareSurplus |
| Modifier and Type | Method and Description |
|---|---|
private ICity |
CaptainsState.getRandomCity() |
| Modifier and Type | Method and Description |
|---|---|
Optional<ICity> |
CaptainsState.findCaptainsCurrentCity(ICaptain captain)
Find the current city of a captain.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CaptainsState.assignToOtherCity(ICity city,
ICaptain captain)
Assign the captain to a new town.
|
Optional<ICaptain> |
CaptainsState.getCaptain(ICity city)
Return a captain for a town if there is one.
|
void |
CaptainsState.hireCaptain(ICaptain captain,
ICity city)
Remove the captain from the availables.
|
void |
InformantState.setNeededWare(ICity city,
IWare ware) |
void |
InformantState.setPirateLocation(ISeaPirate pirate,
ICity city) |
void |
InformantState.setWareSurplus(ICity city,
IWare ware) |
| Modifier and Type | Method and Description |
|---|---|
ICity |
IPersonalData.getBirthPlace()
Retrieve the birth place
|
| Modifier and Type | Field and Description |
|---|---|
private ICity |
PersonalData.birthPlace |
private ICity |
Reputation.city |
| Constructor and Description |
|---|
Reputation(ICity city,
IPlayer player) |
SpouseData(String name,
String lastName,
boolean male,
ICity birthplace,
org.joda.time.DateTime birthDate,
int popHer,
int popYour,
int conHer,
int conYour,
javafx.scene.image.Image portrait) |
| Modifier and Type | Method and Description |
|---|---|
private int |
WareAmountCalculator.calculateAmount(IWare ware,
ICity city,
int avgPrice,
boolean buying) |
int |
WareAmountCalculator.calculateBuyAmount(IWare ware,
ICity city,
int avgPrice)
Calculate the amount of
ware that can be bought
for at most avgPrice. |
int |
WareAmountCalculator.calculateSellAmount(IWare ware,
ICity city,
int avgPrice)
Calculate the amount of
ware that can be sold
for before dropping below avgPrice. |
| Modifier and Type | Method and Description |
|---|---|
List<IConvoy> |
ConvoyList.findConvoy(ICity city)
Find all convois in town.
|
| Modifier and Type | Method and Description |
|---|---|
ICity |
CityUtilities.findNearbyCityRepeated(ICity startCity,
double radiusFactor,
int max,
List<ICity> exclude)
Find a nearby city.
|
ICity |
CityUtilities.findNearestCity(javafx.geometry.Point2D p)
Find the nearest city to a point
|
ICity |
CityUtilities.findRandomCity(ICity excludedCity)
Find a random city that is not the excluded city.
|
private ICity |
CityUtilities.findRandomCity(List<ICity> excludedCity)
Find a random city that is not the excluded city.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<ICity> |
CityUtilities.findNearbyCity(ICity startCity,
double radiusFactor,
int max,
List<ICity> exclude)
Find a city nearby.
|
List<ICity> |
CityUtilities.findRandomCities(ICity exclude,
int numberOfCities)
Find up to
numberOfCities random cities that are not the excluded one. |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
CityUtilities.checkCities(ICity startCity,
List<ICity> exclude)
Check if there is a city that can be choosen
|
javafx.collections.ObservableList<ICityHallNotice> |
CityUtilities.createNotices(ICity targetCity) |
Optional<ICity> |
CityUtilities.findNearbyCity(ICity startCity,
double radiusFactor,
int max,
List<ICity> exclude)
Find a city nearby.
|
ICity |
CityUtilities.findNearbyCityRepeated(ICity startCity,
double radiusFactor,
int max,
List<ICity> exclude)
Find a nearby city.
|
List<ICity> |
CityUtilities.findRandomCities(ICity exclude,
int numberOfCities)
Find up to
numberOfCities random cities that are not the excluded one. |
ICity |
CityUtilities.findRandomCity(ICity excludedCity)
Find a random city that is not the excluded city.
|
SortedMapRandomizedSameElements<Integer,ICitizen> |
CityUtilities.getCandidateMap(List<ICitizen> candidates,
ICity city)
Create a sorted map of the candidates according to their reputation.
|
boolean |
CityUtilities.isMayor(IPlayer player,
ICity city)
Check if the player is mayor of a city.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
CityUtilities.checkCities(ICity startCity,
List<ICity> exclude)
Check if there is a city that can be choosen
|
Optional<ICity> |
CityUtilities.findNearbyCity(ICity startCity,
double radiusFactor,
int max,
List<ICity> exclude)
Find a city nearby.
|
ICity |
CityUtilities.findNearbyCityRepeated(ICity startCity,
double radiusFactor,
int max,
List<ICity> exclude)
Find a nearby city.
|
private ICity |
CityUtilities.findRandomCity(List<ICity> excludedCity)
Find a random city that is not the excluded city.
|
| Modifier and Type | Method and Description |
|---|---|
ICity |
ModelConfiguration.cityBean(ch.sahits.game.openpatrician.data.map.City cityData) |
ICity |
ModelConfiguration.cityBean(FoundNewSettlement cityData) |
Copyright © 2011-2016 Sahits GmbH. All Rights Reserved.