| Constructor | Description |
|---|---|
CaptainState() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
assignToShip(IShip ship) |
Assign a captain to a ship.
|
int |
getAge() |
Current age of the captain
|
java.util.Optional<IShip> |
getAssignedShip() |
Get the ship the captain is assigned to.
|
int |
getFightSkillLevel() |
Retrieve the level in sea fights between [0,5]
|
java.lang.String |
getName() |
Retrieve the name of the captain
|
int |
getNavigationSkillLevel() |
Retrieve the level in navigation between [0,5]
|
int |
getSalary() |
Retrieve the salary per day.
|
int |
getTradingSkillLevel() |
Retrieve the level in trading between [0,5]
|
void |
setSalary(int salary) |
Set the new salary
|
void |
updatedSailedDistance(int distance) |
Add the sailed distance to the total
|
void |
updateFightWon() |
Increase the number of won fights.
|
void |
updateProfit(int profit) |
Add the profit the total profit.
|
boolean |
upgradeToNextFightingLevel() |
If possible upgrade the captain fight skill to the next level.
|
boolean |
upgradeToNextNavigationLevel() |
If possible upgrade the captain to the next level on navigation skill.
|
boolean |
upgradeToNextTradeLevel() |
Increase the experiance level by one.
|
public int getAge()
ICaptainpublic java.lang.String getName()
ICaptainpublic int getSalary()
ICaptainpublic int getTradingSkillLevel()
ICaptaingetTradingSkillLevel in interface ICaptainpublic int getNavigationSkillLevel()
ICaptaingetNavigationSkillLevel in interface ICaptainpublic int getFightSkillLevel()
ICaptaingetFightSkillLevel in interface ICaptainpublic void setSalary(int salary)
salary - salary of the captain.public void assignToShip(IShip ship)
ICaptainassignToShip in interface ICaptainship - to which the captain is assigned.public java.util.Optional<IShip> getAssignedShip()
getAssignedShip in interface ICaptainpublic boolean upgradeToNextTradeLevel()
ICaptainupgradeToNextTradeLevel in interface ICaptainpublic void updateProfit(int profit)
ICaptainupdateProfit in interface ICaptainprofit - additional profitpublic void updatedSailedDistance(int distance)
ICaptainupdatedSailedDistance in interface ICaptaindistance - additional distancepublic boolean upgradeToNextNavigationLevel()
ICaptainupgradeToNextNavigationLevel in interface ICaptainpublic void updateFightWon()
ICaptainupdateFightWon in interface ICaptainpublic boolean upgradeToNextFightingLevel()
ICaptainupgradeToNextFightingLevel in interface ICaptainCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.