|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IShip
Model of a ship
| Method Summary | |
|---|---|
void |
damage(Object damage)
Damage the ship |
int |
getCapacity()
Available capacity of the ship, this represent the free storage in barrels |
int |
getDamage()
Retrieve the damage of the ship in percentage |
int |
getLoad()
Retrieve the amount of load in barrels that is loaded in actual wares (no wappen or crew) |
Set<IWare> |
getLoadedWares()
Retrieve a list of all loaded wares |
String |
getName()
Retrieve the name of the of the ship |
int |
getSize()
Total capacity of the ship in barrels |
int |
getUpgradeSpaceReduction()
Retrieve the reduction of the load capacity based on the upgrade level. |
int |
getValue()
Retrieve the current value of the ship without its cargo |
AmountablePrice |
getWare(IWare ware)
Retrieve the amount of ware loaded |
boolean |
hasWeapons()
check if weapons are on board |
boolean |
isUpgradable()
Check if the ship can be upgraded |
int |
load(IWare ware,
int amount,
int avgPrice)
Load the ware in the specified amount onto the ship. |
void |
repair()
Repair the damage |
void |
setName(String name)
Set the ships name |
int |
unload(IWare ware,
int amount)
Unload the specified quantity of the ware. |
void |
upgrade()
Upgrade the ship if it is upgradable |
| Method Detail |
|---|
int getSize()
int getCapacity()
boolean isUpgradable()
void upgrade()
String getName()
void setName(String name)
name - Set<IWare> getLoadedWares()
int load(IWare ware,
int amount,
int avgPrice)
ware - to be loadedamount - of items the wareavgPrice - average price of one item of the ware
int unload(IWare ware,
int amount)
ware - to be unloadedamount - amount of items of ware to unload
int getDamage()
void damage(Object damage)
damage - void repair()
int getUpgradeSpaceReduction()
int getLoad()
AmountablePrice getWare(IWare ware)
ware -
boolean hasWeapons()
int getValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||