public interface ICaptain extends IPerson
| Modifier and Type | Method and Description |
|---|---|
void |
assignToShip(IShip ship)
Assign a captain to a ship.
|
int |
getAge()
Current age of the captain
|
Optional<IShip> |
getAssignedShip()
Get the ship the captain is assigned to.
|
int |
getFightSkillLevel()
Retrieve the level in sea fights between [0,5]
|
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 |
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.
|
int getAge()
String getName()
int getSalary()
int getTradingSkillLevel()
void updateProfit(int profit)
profit - additional profitvoid updatedSailedDistance(int distance)
distance - additional distanceboolean upgradeToNextNavigationLevel()
void updateFightWon()
boolean upgradeToNextFightingLevel()
boolean upgradeToNextTradeLevel()
int getNavigationSkillLevel()
int getFightSkillLevel()
Optional<IShip> getAssignedShip()
void assignToShip(IShip ship)
ship - to which the captain is assigned.Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.