IGroupableVessel, INavigableVessel, IShipGrouppublic class ShipGroup extends java.lang.Object implements IShipGroup
| Modifier and Type | Method | Description |
|---|---|---|
void |
addShip(IShip ship) |
Add a ship to the convoy.
|
void |
damage(int damage,
boolean destroyWeapon) |
Damage the ship
|
int |
getCapacity() |
Available capacity of the ship, this represent the free storage in barrels
|
java.util.Optional<ICaptain> |
getCaptian() |
Retrieve the captain of the ship.
|
double |
getCurrentSpeed() |
Current top speed of the ship.
|
int |
getDamage() |
Retrieve the damage of the ship in percentage [0,100]
|
int |
getLoadableSpace() |
Retrieve the total amount of space that is available to store stuff.
|
javafx.beans.binding.IntegerBinding |
getLoadBinding() |
Retrieve the amount of load in barrels that is loaded in actual wares (no wappen or crew)
|
java.util.Set<IWare> |
getLoadedWares() |
Retrieve a list of all loaded wares
|
javafx.geometry.Point2D |
getLocation() |
Retrieve the location of the ship.
|
java.lang.String |
getName() |
Retrieve the name of the of the ship
|
int |
getNumberOfSailors() |
Retrieve the number of sailors on the ship.
|
IShipOwner |
getOwner() |
Retrieve the owner of the ship.
|
boolean |
getPirateFlag() |
Indicate if the vessel has hissed the pirate flag (Jolly Roger)
and the vessel therefore should be considered a pirate vessel.
|
java.util.List<IShip> |
getShips() |
Retrieve a list of the ships in the convoy.
|
int |
getSize() |
Total capacity of the ship in barrels.
|
double |
getTopSpeed() |
Retrieve the speed of the vessel in kilometer per hour
|
java.lang.String |
getUuid() |
Retrieve a universal unique identifier for the vessel.
|
AmountablePrice<IWare> |
getWare(IWare ware) |
Retrieve the amount of ware loaded
|
int |
getWeaponAmount(IWeapon weaponType) |
Retrieve the amount of weapons on the ship
|
int |
load(IWare ware,
int amount,
int avgPrice) |
Load the ware in the specified amount onto the ship.
|
javafx.beans.property.BooleanProperty |
pirateFlagProperty() |
Property defining the pirate activit y of the vessel.
|
void |
removeShip(IShip ship) |
Remove a ship from the convoy.
|
void |
setLocation(javafx.geometry.Point2D location) |
Set the location of the ship.
|
void |
togglePirateFlag() |
Hiss or lower the pirate flag (Jolly Roger).
|
int |
unload(IWare ware,
int amount) |
Unload the specified quantity of the ware.
|
public ShipGroup(IShip leadShip)
public int getSize()
INavigableVesselgetSize in interface INavigableVesselpublic int getCapacity()
INavigableVesselgetCapacity in interface INavigableVesselpublic java.lang.String getName()
INavigableVesselgetName in interface INavigableVesselpublic java.util.Set<IWare> getLoadedWares()
INavigableVesselgetLoadedWares in interface INavigableVesselpublic int load(IWare ware, int amount, int avgPrice)
INavigableVesselload in interface INavigableVesselware - to be loadedamount - of items the wareavgPrice - average price of one item of the warepublic int unload(IWare ware, int amount)
INavigableVesselunload in interface INavigableVesselware - to be unloadedamount - amount of items of ware to unloadpublic int getDamage()
INavigableVesselgetDamage in interface INavigableVesselpublic void damage(int damage,
boolean destroyWeapon)
INavigableVesseldamage in interface INavigableVesseldamage - amount of damage that is inflicteddestroyWeapon - flag indicating if weapons may be destroyed.public javafx.beans.binding.IntegerBinding getLoadBinding()
INavigableVesselgetLoadBinding in interface INavigableVesselpublic AmountablePrice<IWare> getWare(IWare ware)
INavigableVesselgetWare in interface INavigableVesselware - for which to retrieve price and amountpublic int getNumberOfSailors()
INavigableVesselgetNumberOfSailors in interface INavigableVesselpublic java.util.Optional<ICaptain> getCaptian()
INavigableVesselgetCaptian in interface INavigableVesselpublic javafx.geometry.Point2D getLocation()
INavigableVesselgetLocation in interface INavigableVesselpublic void setLocation(javafx.geometry.Point2D location)
INavigableVesselsetLocation in interface INavigableVessellocation - of the shippublic IShipOwner getOwner()
INavigableVesselgetOwner in interface INavigableVesselpublic int getWeaponAmount(IWeapon weaponType)
INavigableVesselgetWeaponAmount in interface INavigableVesselweaponType - SWORD | BOW | CROSSBOW | MUSKETpublic int getLoadableSpace()
INavigableVesselgetLoadableSpace in interface INavigableVesselpublic double getTopSpeed()
INavigableVesselgetTopSpeed in interface INavigableVesselpublic double getCurrentSpeed()
INavigableVesselgetCurrentSpeed in interface INavigableVesselpublic java.lang.String getUuid()
INavigableVesselgetUuid in interface INavigableVesselpublic boolean getPirateFlag()
INavigableVesselgetPirateFlag in interface INavigableVesselpublic void togglePirateFlag()
INavigableVesseltogglePirateFlag in interface INavigableVesselpublic javafx.beans.property.BooleanProperty pirateFlagProperty()
INavigableVesselpirateFlagProperty in interface INavigableVesselpublic java.util.List<IShip> getShips()
IShipGroupgetShips in interface IGroupableVesselgetShips in interface IShipGrouppublic void addShip(IShip ship)
IShipGroupaddShip in interface IShipGroupship - to be added.public void removeShip(IShip ship)
IShipGroupremoveShip in interface IShipGroupship - to be removed.Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.