Class PeopleFactory
- java.lang.Object
-
- ch.sahits.game.openpatrician.clientserverinterface.model.factory.PeopleFactory
-
@Component @Lazy @DependentInitialisation(StartNewGameBean.class) public class PeopleFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.context.ApplicationContext
context
private Date
date
private IMapLocationProviderFacade
locationProvider
private IMapImageServiceFacade
mapService
private SeaPiratesState
piratesState
-
Constructor Summary
Constructors Constructor Description PeopleFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IBowmen
createBowman()
ICrossbowmen
createCrossbowman()
IMusketeer
createMusketeer()
ICaptain
createNewCaptainProperty()
Retrieve a new captain.IContractBroker
createNewContractBroker(AmountablePrice<IWare> amountable, IWare ware)
Retrieve a contract brokerISeaPirate
createNewPirate(java.lang.String firstName, java.lang.String lastName, INavigableVessel ship)
Create a pirate near a certain pointINonFreeSeaPirate
createNewPirate(java.lang.String firstName, java.lang.String lastName, IShip ship, IPlayer hiree, ICity nearCity)
Create an new pirate anywhere on the seaIPikemen
createPikeman()
void
free(INonFreeSeaPirate pirate)
A non free pirate becomes free.
-
-
-
Field Detail
-
context
@Autowired private org.springframework.context.ApplicationContext context
-
locationProvider
@Autowired private IMapLocationProviderFacade locationProvider
-
date
@Autowired private Date date
-
piratesState
@Autowired private SeaPiratesState piratesState
-
mapService
@Autowired private IMapImageServiceFacade mapService
-
-
Method Detail
-
createNewCaptainProperty
public ICaptain createNewCaptainProperty()
Retrieve a new captain.- Returns:
- new captain instance
-
createNewContractBroker
public IContractBroker createNewContractBroker(AmountablePrice<IWare> amountable, IWare ware)
Retrieve a contract broker- Returns:
- new contract brooker instance.
-
createBowman
public IBowmen createBowman()
-
createCrossbowman
public ICrossbowmen createCrossbowman()
-
createPikeman
public IPikemen createPikeman()
-
createMusketeer
public IMusketeer createMusketeer()
-
createNewPirate
public INonFreeSeaPirate createNewPirate(java.lang.String firstName, java.lang.String lastName, IShip ship, IPlayer hiree, ICity nearCity)
Create an new pirate anywhere on the sea- Parameters:
firstName
- of the piratelastName
- of the pirateship
- of the piratehiree
- player who hired the piratenearCity
- city near which the pirate should roam or null.- Returns:
- new non free pirate instance
-
createNewPirate
public ISeaPirate createNewPirate(java.lang.String firstName, java.lang.String lastName, INavigableVessel ship)
Create a pirate near a certain point- Parameters:
firstName
- of the piratelastName
- of the pirateship
- new ship of the pirate- Returns:
- new sea pirate instance
-
free
public void free(INonFreeSeaPirate pirate)
A non free pirate becomes free.- Parameters:
pirate
- non free pirate instance that is to be freed.
-
-