| Type | Property and Description |
|---|---|
javafx.beans.property.IntegerProperty |
numberOfSailors |
javafx.beans.binding.BooleanBinding |
passengerPresent
Binding indicating if a passenger is present.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPassenger(IPerson passanger)
Move a passenger to the ship.
|
int |
getDistanceInKmForOneHealthPointReduction()
Retrieve the distance in km the ship has to travel under normal conditions, for it's health to be reduced by one.
|
int |
getMaxNumberOfSailors()
Retrieve the maximum of sailors that can be put on the ship.
|
int |
getMinNumberOfSailors()
Retrieve the minimum of sailors needed to operate the ship.
|
int |
getOccupiedSpace() |
Optional<IPerson> |
getPassenger()
Retrieve the passenger on the ship.
|
EShipType |
getShipType()
Retrieve the type of the ship.
|
EShipUpgrade |
getShipUpgradeLevel()
Retrieve the upgrade level of the ship.
|
IShipWeaponsLocation |
getShipWeaponsLocation() |
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
|
boolean |
hasWeapons()
check if weapons are on board
|
boolean |
isAvailable()
Indicate if the ship is available.
|
boolean |
isUpgradable()
Check if the ship can be upgraded
|
void |
leavePassanger()
Passenger leave ship.
|
void |
move(IWeapon weaponType,
int amount)
Move weapons in or out.
|
javafx.beans.property.IntegerProperty |
numberOfSailorsProperty() |
javafx.beans.binding.BooleanBinding |
passengerPresentProperty()
Binding indicating if a passenger is present.
|
void |
repair()
Repair the damage
|
void |
setAvailable(boolean available)
Set the available flag on the ship.
|
void |
setCaptain(ICaptain captain)
Set the captain on the ship
|
void |
setName(String name)
Set the ships name
|
void |
setNumberOfSailors(int nbSailors)
Set the number of sailors.
|
void |
setOccupiedSpace(int space) |
void |
setOwner(IShipOwner player)
Define the owner of the ship
|
void |
setShipWeaponsLocation(IShipWeaponsLocation shipWeaponsLocation)
Set the ships weapons location.
|
void |
upgrade()
Upgrade the ship if it is upgradable
|
damage, getCapacity, getCaptian, getCurrentSpeed, getDamage, getLoadableSpace, getLoadBinding, getLoadedWares, getLocation, getName, getNumberOfSailors, getOwner, getPirateFlag, getSize, getTopSpeed, getUuid, getWare, getWeaponAmount, load, setLocation, togglePirateFlag, unloadjavafx.beans.property.IntegerProperty numberOfSailorsProperty
setNumberOfSailors(int)javafx.beans.binding.BooleanBinding passengerPresentProperty
boolean isUpgradable()
void upgrade()
void setName(String name)
name - void repair()
int getUpgradeSpaceReduction()
boolean hasWeapons()
int getValue()
void setNumberOfSailors(int nbSailors)
nbSailors - .javafx.beans.property.IntegerProperty numberOfSailorsProperty()
setNumberOfSailors(int)int getMinNumberOfSailors()
int getMaxNumberOfSailors()
void setCaptain(ICaptain captain)
captain - void move(IWeapon weaponType, int amount)
weaponType - SWORD | BOW | CROSSBOW | MUSKETamount - void addPassenger(IPerson passanger)
passanger - void leavePassanger()
Optional<IPerson> getPassenger()
EShipType getShipType()
void setOwner(IShipOwner player)
player - EShipUpgrade getShipUpgradeLevel()
IShipWeaponsLocation getShipWeaponsLocation()
boolean isAvailable()
void setAvailable(boolean available)
available - int getOccupiedSpace()
void setOccupiedSpace(int space)
javafx.beans.binding.BooleanBinding passengerPresentProperty()
void setShipWeaponsLocation(IShipWeaponsLocation shipWeaponsLocation)
shipWeaponsLocation - int getDistanceInKmForOneHealthPointReduction()
Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.