IMap@Component @Lazy @DependentInitialisation(StartNewGameBean.class) public class GameMap extends java.lang.Object implements IMap
| Constructor | Description |
|---|---|
GameMap() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(ICity city) |
Add a new city.
|
void |
addTradeRoute(ITradeRoute tradeRoute) |
|
ICity |
findCity(java.lang.String cityName) |
Find a city by its name.
|
java.util.Optional<ICity> |
findCity(javafx.geometry.Point2D location) |
Find the city at the given coordinates.
|
java.util.List<ICity> |
getCities() |
Retrieve an unmodifiable list of all the cities in the map
|
java.util.List<ICity> |
getCities(IPlayer player) |
Retrieve an unmodifiable list of all the cities in the map also including the once only visible to the player.
|
int |
getNumberCities() |
Retrieve the number of cities that are on the map.
|
void |
setup(java.util.Collection<ICity> cities,
javafx.geometry.Dimension2D dim,
java.lang.String mapName,
java.lang.String bwImageName,
double numberOfPixelPerKilometer) |
Initialize the map by means of a list of its cities.
|
getCityCoordinates, getDimension, getFutureTowns, getLandbridges, getMapBWImagePath, getMapImagePath, getNumberOfPixelPerKilometer, getPirateNests, getTownsInFounding, getTradeRoutespublic void setup(java.util.Collection<ICity> cities, javafx.geometry.Dimension2D dim, java.lang.String mapName, java.lang.String bwImageName, double numberOfPixelPerKilometer)
cities - List of cities for which to set up the mapdim - dimensions of the mapbwImageName - black and white image filename distinguishing land and seamapName - image filenamenumberOfPixelPerKilometer - ratio of pixels that make up one km on the mappublic int getNumberCities()
IMapgetNumberCities in interface IMappublic java.util.List<ICity> getCities()
IMappublic ICity findCity(java.lang.String cityName)
IMappublic java.util.List<ICity> getCities(IPlayer player)
IMappublic java.util.Optional<ICity> findCity(javafx.geometry.Point2D location)
IMappublic void addTradeRoute(ITradeRoute tradeRoute)
Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.