Interface IMap
-
- All Known Implementing Classes:
GameMap
public interface IMap
Interface defining the map that defines the game plan- Author:
- Andi Hotz, (c) Sahits GmbH, 2011 Created on Sep 9, 2011
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(ICity city)
Add a new city.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 mapjava.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.java.util.List<javafx.geometry.Point2D>
getCityCoordinates()
Retrieve a list of all coordinates of the cities.javafx.geometry.Dimension2D
getDimension()
Retrieve the map dimensionsjava.util.List<IFutureTowns>
getFutureTowns()
Retrieve the future towns.java.util.List<ILandBridge>
getLandbridges()
Retrieve the land bridges.java.lang.String
getMapBWImagePath()
Retrieve the path for the black and white variant of the map.java.lang.String
getMapImagePath()
Retrieve the path for the map image without the cities added.int
getNumberCities()
Retrieve the number of cities that are on the map.double
getNumberOfPixelPerKilometer()
Retrieve the scale of the map by providing a number to convert one kilometer into a number of pixels.java.util.List<PirateNest>
getPirateNests()
Retrieve the pirate nestscom.google.common.collect.Multimap<IPlayer,ICity>
getTownsInFounding()
Retrieve the cities that are currently being founded by players.java.util.Set<ITradeRoute>
getTradeRoutes()
Retrieve the trade routes defined for this map.
-
-
-
Method Detail
-
getNumberCities
int getNumberCities()
Retrieve the number of cities that are on the map.- Returns:
- number of cities on the map.
-
getCities
java.util.List<ICity> getCities()
Retrieve an unmodifiable list of all the cities in the map- Returns:
- list of cities on the map, visible by all players.
-
getCities
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.- Parameters:
player
- for whom the cities are visible.- Returns:
- list of cities on the map, inculding the ones only visible to
player
-
findCity
ICity findCity(java.lang.String cityName)
Find a city by its name.- Parameters:
cityName
- name of the city- Returns:
- city reference.
-
getDimension
javafx.geometry.Dimension2D getDimension()
Retrieve the map dimensions- Returns:
- dimesion
-
getMapImagePath
java.lang.String getMapImagePath()
Retrieve the path for the map image without the cities added.- Returns:
- original map image path.
-
getMapBWImagePath
java.lang.String getMapBWImagePath()
Retrieve the path for the black and white variant of the map.- Returns:
- image file path for the black and white map for land and sea.
-
getFutureTowns
java.util.List<IFutureTowns> getFutureTowns()
Retrieve the future towns.- Returns:
- list of future towns, that can be founded.
-
getLandbridges
java.util.List<ILandBridge> getLandbridges()
Retrieve the land bridges.- Returns:
- list of landbridges that can be built.
-
getPirateNests
java.util.List<PirateNest> getPirateNests()
Retrieve the pirate nests- Returns:
- list of pirate nests.
-
getNumberOfPixelPerKilometer
double getNumberOfPixelPerKilometer()
Retrieve the scale of the map by providing a number to convert one kilometer into a number of pixels.- Returns:
- number of pixels that make up one km on the map.
-
findCity
java.util.Optional<ICity> findCity(javafx.geometry.Point2D location)
Find the city at the given coordinates.- Parameters:
location
- of the supposed city.- Returns:
- instance of the city or null if at the coordinates there is no city.
-
getCityCoordinates
java.util.List<javafx.geometry.Point2D> getCityCoordinates()
Retrieve a list of all coordinates of the cities.- Returns:
- List of coordinates for all cities.
-
getTownsInFounding
com.google.common.collect.Multimap<IPlayer,ICity> getTownsInFounding()
Retrieve the cities that are currently being founded by players.- Returns:
- multimap of player who are founding cities.
-
add
void add(ICity city)
Add a new city.- Parameters:
city
- to be added
-
getTradeRoutes
java.util.Set<ITradeRoute> getTradeRoutes()
Retrieve the trade routes defined for this map.- Returns:
- set of trade routes defined for this map.
-
-