| Modifier and Type | Field and Description |
|---|---|
private ICareer |
careerLevel |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private ICompany |
company |
private javafx.collections.ObservableList<IShip> |
fleet |
private IPersonalData |
personalData |
private ESocialRank |
rank |
private MapSegmentedImage |
segmentedMap |
private ISpouseData |
spouse |
private PeriodicalTimeUpdateFactory |
updateFactory |
private long |
UUID |
| Constructor and Description |
|---|
Player(ICity homeTown,
IPersonalData personalData,
long cash,
ESocialRank rank,
GameFactory gameFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addShip(IShip ship)
Add a new ship for the player
|
boolean |
equals(Object o) |
List<IBuilding> |
findBuildings(ICity city)
Find all buildings of the player in the city
|
List<IBuilding> |
findBuildings(ICity city,
Class<? extends IBuilding> buildingClass)
Find all buildings in the city that are some subtype of the indicated class
|
List<IShip> |
findShips(ICity city)
Find all ships in a city
|
ITradingOffice |
findTradingOffice(ICity city)
Find the trading office of the player in the city.
|
long |
getCash()
Retrieve the amount of money of the player
|
List<IShip> |
getFleet()
Get a list of all ships
|
ICity |
getHometown()
Retreive the hometown of the citizen.
|
String |
getLastName()
Get a players last name
|
String |
getName()
Retrieve the players name
|
IPersonalData |
getPersonalData()
Retrieve the personal data of the player
|
ISpouseData |
getSpouseData()
Retrieve the personal data of the players spouse.
|
int |
hashCode() |
private void |
init() |
boolean |
isMale()
Check if the player is male
|
void |
marry(ISpouseData spouse)
Marry a spouse
|
void |
removeShip(IShip ship)
Remove a ship for the player
|
void |
updateCash(int diff)
Add or subtract some cash
|
void |
updateRank(ESocialRank rank)
Update to the new social rank
|
void |
widow()
Widow and become unmarried again
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCareerLevel, getCompany, getSegmentedMap, setSegmentedMapprivate final javafx.collections.ObservableList<IShip> fleet
private final long UUID
private ESocialRank rank
private ICareer careerLevel
private IPersonalData personalData
private ISpouseData spouse
private final ICompany company
private MapSegmentedImage segmentedMap
@Autowired private PeriodicalTimeUpdateFactory updateFactory
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
public Player(ICity homeTown, IPersonalData personalData, long cash, ESocialRank rank, GameFactory gameFactory)
@PostConstruct private void init()
public String getName()
ICitizenpublic String getLastName()
ICitizengetLastName in interface ICitizenpublic ICity getHometown()
ICitizengetHometown in interface ICitizenpublic List<IShip> getFleet()
IPlayerpublic boolean isMale()
IPlayerpublic void addShip(IShip ship)
IPlayerpublic void removeShip(IShip ship)
IPlayerremoveShip in interface IPlayerpublic long getCash()
IPlayerpublic void updateCash(int diff)
updateCash in interface IPlayerdiff - amount of money that is transferredpublic List<IBuilding> findBuildings(ICity city)
IPlayerfindBuildings in interface IPlayerpublic ITradingOffice findTradingOffice(ICity city)
IPlayerfindTradingOffice in interface IPlayerpublic List<IBuilding> findBuildings(ICity city, Class<? extends IBuilding> buildingClass)
IPlayerfindBuildings in interface IPlayerpublic void marry(ISpouseData spouse)
spouse - public void widow()
public IPersonalData getPersonalData()
IPlayergetPersonalData in interface IPlayerpublic ISpouseData getSpouseData()
IPlayergetSpouseData in interface IPlayerpublic void updateRank(ESocialRank rank)
IPlayerupdateRank in interface IPlayerpublic List<IShip> findShips(ICity city)
IPlayerCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.