public abstract class Player extends Object implements IPlayer
| Modifier and Type | Field and Description |
|---|---|
private ICareer |
careerLevel |
private List<IChild> |
children |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private ICompany |
company |
private int |
criminalDrive |
private javafx.collections.ObservableList<IShip> |
fleet |
private LUIDProvider |
luidProvider |
private IPersonalData |
personalData |
private ESocialRank |
rank |
private MapSegmentedImage |
segmentedMap |
private javafx.collections.ObservableList<INavigableVessel> |
selectableVessel |
private Optional<ISpouseData> |
spouse |
private String |
uuid |
| Constructor and Description |
|---|
Player(ICity homeTown,
IPersonalData personalData,
ESocialRank rank,
ICompany company) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectableVessel(INavigableVessel vessel)
Add a selectable vessel to the list.
|
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
|
<T extends IBuilding> |
findBuildings(ICity city,
Class<T> buildingClass)
Find all buildings in the city that are some subtype of the indicated class
|
List<INavigableVessel> |
findShips(ICity city)
Find all ships in a city
|
Optional<ITradingOffice> |
findTradingOffice(ICity city)
Find the trading office of the player in the city.
|
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
|
List<INavigableVessel> |
getSelectableVessels()
Provide a different view on the fleet by containing all the
vessels that can be selected.
|
Optional<ISpouseData> |
getSpouseData()
Retrieve the personal data of the players spouse.
|
int |
hashCode() |
private void |
init() |
void |
marry(ISpouseData spouse)
Marry a spouse
|
void |
receiveSum(long amount)
Handle method for recieving a payment
|
void |
removeSelectableVessel(INavigableVessel vessel)
Remove a selectable vessel from the list.
|
void |
removeShip(IShip ship)
Remove a ship for the player
|
void |
spouseDies()
Widow and become unmarried again.
|
void |
updateCrimialDrive(int value)
Update the new value indicating the level of criminallity of the player
|
void |
updateRank(ESocialRank rank)
Update to the new social rank
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCareerLevel, getChildren, getCompany, getCriminalDrive, getSegmentedMap, setCareerLevel, setSegmentedMapprivate final javafx.collections.ObservableList<IShip> fleet
private final javafx.collections.ObservableList<INavigableVessel> selectableVessel
private String uuid
private ESocialRank rank
private ICareer careerLevel
private IPersonalData personalData
private Optional<ISpouseData> spouse
private final ICompany company
private MapSegmentedImage segmentedMap
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired private LUIDProvider luidProvider
private int criminalDrive
public Player(ICity homeTown, IPersonalData personalData, ESocialRank rank, ICompany company)
@PostConstruct @IgnoreOnDeserialisation private void init()
public String getName()
ICitizengetName in interface ICitizengetName in interface IShipOwnerpublic String getLastName()
ICitizengetLastName in interface ICitizengetLastName in interface IShipOwnerpublic ICity getHometown()
ICitizengetHometown in interface ICitizenpublic List<IShip> getFleet()
IPlayerpublic List<INavigableVessel> getSelectableVessels()
IPlayergetSelectableVessels in interface IPlayerpublic void addSelectableVessel(INavigableVessel vessel)
IPlayeraddSelectableVessel in interface IPlayervessel - to be addedpublic void removeSelectableVessel(INavigableVessel vessel)
IPlayerremoveSelectableVessel in interface IPlayervessel - to be removed.public void addShip(IShip ship)
IPlayerpublic void removeShip(IShip ship)
IPlayerremoveShip in interface IPlayerpublic List<IBuilding> findBuildings(ICity city)
IPlayerfindBuildings in interface IPlayerpublic Optional<ITradingOffice> findTradingOffice(ICity city)
IPlayerfindTradingOffice in interface IPlayerpublic <T extends IBuilding> List<T> findBuildings(ICity city, Class<T> buildingClass)
IPlayerfindBuildings in interface IPlayerpublic void marry(ISpouseData spouse)
public void spouseDies()
IPlayerspouseDies in interface IPlayerpublic IPersonalData getPersonalData()
IPlayergetPersonalData in interface IPlayerpublic Optional<ISpouseData> getSpouseData()
IPlayergetSpouseData in interface IPlayerpublic void updateRank(ESocialRank rank)
IPlayerupdateRank in interface IPlayerpublic List<INavigableVessel> findShips(ICity city)
IPlayerpublic void receiveSum(long amount)
ICreditorreceiveSum in interface ICreditorpublic void updateCrimialDrive(int value)
IPlayerupdateCrimialDrive in interface IPlayerCopyright © 2011-2017 Sahits GmbH. All Rights Reserved.