IConvoy, IGroupableVessel, INavigableVesselpublic class Convoy extends java.lang.Object implements IConvoy
| Constructor | Description |
|---|---|
Convoy(IShip orlegShip,
boolean publicConvoy) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addShip(IShip ship) |
Add a ship to the convoy.
|
void |
damage(int damage,
boolean destroyWeapon) |
Apply the damage to all ships.
|
int |
getCapacity() |
Available capacity of the ship, this represent the free storage in barrels
|
java.util.Map<IPlayer,java.lang.Integer> |
getCapacityPerOwner() |
Collect the convoys capacity per player who has ships
in the convoy.
|
java.util.Optional<ICaptain> |
getCaptian() |
Retrieve the captain of the Orleg ship.
|
double |
getCurrentSpeed() |
Current top speed of the ship.
|
int |
getDamage() |
Retrieve the damage of the ship that is damaged the most.
|
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() |
The name of the convoy is the name of the Orleg ship.
|
int |
getNumberOfSailors() |
Retrieve the number of sailors on the ship.
|
IShip |
getOrlegShip() |
Retrieve the lead ship of the convoy.
|
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<IPlayer> |
getPlayers() |
Get all players who have a ship in the convoy.
|
java.util.List<IShip> |
getShips() |
Retrieve a list of the ships in the convoy.
|
java.util.List<IShip> |
getShips(IPlayer player) |
Get all the ships in the convoi that belong to a player.
|
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
|
boolean |
hasWeapons() |
Though a convoy has always weapons this is only something that
is handled on the level of a single ship.
|
int |
load(IWare ware,
int amount,
int avgPrice) |
The wares are loaded onto the ships in the convoy
in the iteration order.
|
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 wares from the ships in the convoy in the iteration
order.
|
isPublicConvoypublic Convoy(IShip orlegShip, boolean publicConvoy)
public boolean hasWeapons()
IConvoyhasWeapons in interface IConvoypublic IShip getOrlegShip()
IConvoygetOrlegShip in interface IConvoypublic java.util.List<IShip> getShips()
IConvoygetShips in interface IConvoygetShips in interface IGroupableVesselpublic void addShip(IShip ship)
IConvoypublic void removeShip(IShip ship)
IConvoyremoveShip in interface IConvoyship - to be removed.public int getSize()
INavigableVesselgetSize in interface INavigableVesselpublic int getCapacity()
INavigableVesselgetCapacity in interface INavigableVesselpublic java.lang.String getName()
getName in interface INavigableVesselpublic java.util.Set<IWare> getLoadedWares()
INavigableVesselgetLoadedWares in interface INavigableVesselpublic int load(IWare ware, int amount, int avgPrice)
load in interface INavigableVesselware - to be loadedamount - of items the wareavgPrice - average price of one item of the warepublic int unload(IWare ware, int amount)
unload in interface INavigableVesselware - to be unloadedamount - amount of items of ware to unloadpublic int getDamage()
getDamage in interface INavigableVesselpublic void damage(int damage,
boolean destroyWeapon)
damage in interface INavigableVesseldamage - average damage by shipdestroyWeapon - 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()
getCaptian in interface INavigableVesselpublic int getWeaponAmount(IWeapon weaponType)
INavigableVesselgetWeaponAmount in interface INavigableVesselweaponType - SWORD | BOW | CROSSBOW | MUSKETpublic 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 java.util.List<IShip> getShips(IPlayer player)
IConvoypublic java.util.List<IPlayer> getPlayers()
IConvoygetPlayers in interface IConvoypublic java.util.Map<IPlayer,java.lang.Integer> getCapacityPerOwner()
IConvoygetCapacityPerOwner in interface IConvoypublic 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 INavigableVesselCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.