@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 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 |
| Constructor and Description |
|---|
GameMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildSettlement(ICity city,
IPlayer player)
Add the settlement for the player.
|
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 |
settlementBecomesTown(ICity city)
A founded settlement is complete and becomes a town.
|
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, waitgetDimension, getFutureTowns, getLandbridges, getMapBWImagePath, getMapImagePath, getNumberOfPixelPerKilometer, getPirateNestsprivate 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
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 void buildSettlement(ICity city, IPlayer player)
IMapbuildSettlement in interface IMapcity - to be foundedplayer - for which this city is reachablepublic void settlementBecomesTown(ICity city)
IMapsettlementBecomesTown in interface IMapcity - that became a townpublic List<ICity> getCities(IPlayer player)
IMapCopyright © 2011-2016 Sahits GmbH. All Rights Reserved.