@Component @Lazy @DependentInitialisation(value=StartNewGameBean.class) public class GameMap extends Object implements IMap
| Modifier and Type | Field and Description |
|---|---|
private CaptainsState |
captainsState |
private LinkedList<ICity> |
cities |
private List<javafx.geometry.Point2D> |
cityCoordinates |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private javafx.geometry.Dimension2D |
dimension |
private List<IFutureTowns> |
futureTowns |
private List<ILandBridge> |
landbridges |
private String |
mapBWImagePath |
private String |
mapImagePath |
private double |
numberOfPixelPerKilometer |
private List<PirateNest> |
pirateNests |
private com.google.common.collect.Multimap<IPlayer,ICity> |
townsInFounding |
private Set<ITradeRoute> |
tradeRoutes |
| Constructor and Description |
|---|
GameMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ICity city)
Add a new city.
|
void |
addTradeRoute(ITradeRoute tradeRoute) |
Optional<ICity> |
findCity(javafx.geometry.Point2D location)
Find the city at the given coordinates.
|
ICity |
findCity(String cityName)
Find a city by its name.
|
List<ICity> |
getCities()
Retrieve an unmodifiable list of all the cities in the map
|
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(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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCityCoordinates, getDimension, getFutureTowns, getLandbridges, getMapBWImagePath, getMapImagePath, getNumberOfPixelPerKilometer, getPirateNests, getTownsInFounding, getTradeRoutesprivate final LinkedList<ICity> cities
@Autowired private CaptainsState captainsState
private javafx.geometry.Dimension2D dimension
private String mapImagePath
private String mapBWImagePath
private double numberOfPixelPerKilometer
private final List<IFutureTowns> futureTowns
private final List<ILandBridge> landbridges
private final List<PirateNest> pirateNests
private List<javafx.geometry.Point2D> cityCoordinates
private Set<ITradeRoute> tradeRoutes
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
public void setup(Date date, Collection<ICity> cities, javafx.geometry.Dimension2D dim, String mapName, String bwImageName, double numberOfPixelPerKilometer)
cities - public int getNumberCities()
IMapgetNumberCities in interface IMappublic List<ICity> getCities()
IMappublic ICity findCity(String cityName)
IMappublic List<ICity> getCities(IPlayer player)
IMappublic Optional<ICity> findCity(javafx.geometry.Point2D location)
IMappublic void addTradeRoute(ITradeRoute tradeRoute)
Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.