@Lazy @Component public class CitiesState extends Object
| Modifier and Type | Field and Description |
|---|---|
private ConcurrentHashMap<ICity,CityState> |
cities
List of all the cities coupled with their state to be handeld by this engine
|
private GameFactory |
gameFactory |
private IMap |
map |
private Random |
rnd |
| Constructor and Description |
|---|
CitiesState() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<GenericPair<ICity,IWare>> |
findCityWithMostNeededWare()
Find a possible city that has needed wares.
|
com.google.common.base.Optional<GenericPair<ICity,IWare>> |
findCityWithSurplusWare()
Find a possible city that has needed wares.
|
List<CityState> |
getCityEngineStates() |
void |
init() |
@Autowired private IMap map
@Autowired private Random rnd
@Autowired private GameFactory gameFactory
private ConcurrentHashMap<ICity,CityState> cities
@PostConstruct public void init()
public com.google.common.base.Optional<GenericPair<ICity,IWare>> findCityWithMostNeededWare()
public com.google.common.base.Optional<GenericPair<ICity,IWare>> findCityWithSurplusWare()
Copyright © 2011-2015 Sahits GmbH. All Rights Reserved.