ICreditor, ICitizen, IPlayer, IShipOwnerAIPlayer, HumanPlayerpublic abstract class Player extends java.lang.Object implements IPlayer
| Constructor | Description |
|---|---|
Player(ICity homeTown,
IPersonalData personalData,
ESocialRank rank,
ICompany company) |
| Modifier and Type | Method | 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(java.lang.Object o) |
|
java.util.List<IBuilding> |
findBuildings(ICity city) |
Find all buildings of the player in the city
|
<T extends IBuilding> |
findBuildings(ICity city,
java.lang.Class<T> buildingClass) |
Find all buildings in the city that are some subtype of the indicated class
|
java.util.List<INavigableVessel> |
findShips(ICity city) |
Find all ships in a city
|
java.util.Optional<ITradingOffice> |
findTradingOffice(ICity city) |
Find the trading office of the player in the city.
|
java.util.List<IShip> |
getFleet() |
Get a list of all ships
|
ICity |
getHometown() |
Retreive the hometown of the citizen.
|
java.lang.String |
getLastName() |
Get a players last name
|
java.lang.String |
getName() |
Retrieve the players name
|
IPersonalData |
getPersonalData() |
Retrieve the personal data of the player
|
java.util.List<INavigableVessel> |
getSelectableVessels() |
Provide a different view on the fleet by containing all the
vessels that can be selected.
|
java.util.Optional<ISpouseData> |
getSpouseData() |
Retrieve the personal data of the players spouse.
|
int |
hashCode() |
|
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
|
getCareerLevel, getChildren, getCompany, getCriminalDrive, getSegmentedMap, getUuid, setCareerLevel, setSegmentedMappublic Player(ICity homeTown, IPersonalData personalData, ESocialRank rank, ICompany company)
public java.lang.String getName()
ICitizengetName in interface ICitizengetName in interface IShipOwnerpublic java.lang.String getLastName()
ICitizengetLastName in interface ICitizengetLastName in interface IShipOwnerpublic ICity getHometown()
ICitizengetHometown in interface ICitizenpublic java.util.List<IShip> getFleet()
IPlayerpublic java.util.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 IPlayership - to be removed from the fleet.public java.util.List<IBuilding> findBuildings(ICity city)
IPlayerfindBuildings in interface IPlayercity - where to search for buildings.city owned by the player.public java.util.Optional<ITradingOffice> findTradingOffice(ICity city)
IPlayerfindTradingOffice in interface IPlayercity - where to look for a trading officecity.public <T extends IBuilding> java.util.List<T> findBuildings(ICity city, java.lang.Class<T> buildingClass)
IPlayerfindBuildings in interface IPlayercity - in which to look for buildingsbuildingClass - class of the building that is searchedcity.public void marry(ISpouseData spouse)
public void spouseDies()
IPlayerspouseDies in interface IPlayerpublic IPersonalData getPersonalData()
IPlayergetPersonalData in interface IPlayerpublic java.util.Optional<ISpouseData> getSpouseData()
IPlayergetSpouseData in interface IPlayerpublic void updateRank(ESocialRank rank)
IPlayerupdateRank in interface IPlayerrank - new social rank.public java.util.List<INavigableVessel> findShips(ICity city)
IPlayerpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void receiveSum(long amount)
ICreditorreceiveSum in interface ICreditoramount - paid money amount.public void updateCrimialDrive(int value)
IPlayerupdateCrimialDrive in interface IPlayervalue - new criminal drive value.Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.