| Constructor | Description |
|---|---|
ShipyardState(ICity city) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addShipBuildingOrder(IShipDueDate dueDate,
java.util.Optional<TimedTask> task) |
Add an order for building a new ship to the list.
|
void |
addShipRefitOrder(IShipDueDate dueDate,
java.util.Optional<TimedTask> task) |
Add an order for refitting a ship to the list.
|
void |
addShipRepairOrder(IShipDueDate dueDate,
java.util.Optional<TimedTask> task) |
Add an order for repairing a ship to the list.
|
int |
calculateBuildTime(EShipType type) |
Calculate the build time for the ship of type.
|
int |
calculateConstructionCosts(EShipType type) |
Calculate the labor costs for building a new ship of the indicated type.
|
int |
calculateRefitCosts(EShipType type,
int levels) |
Calculate the labor costs for the refit based on the ship type and how many levels
should be upgraded.
|
int |
calculateRefitTime(EShipType type) |
Calculate the time in days it takes for refitting.
|
int |
calculateRepairCosts(int repairTime,
int materialCosts) |
Calculate the repair costs.
|
int |
calculateRepairMaterialCosts(IShip ship,
int damage) |
Calculate the material costs for the repair.
|
int |
calculateRepairTime(EShipType type) |
Calculate the repair time for the ship of type.
|
void |
cancelRepair(IShip ship) |
Cancel the repair of the ship.
|
void |
cancelShipBuildingOrder(java.time.LocalDateTime finish) |
Cancel the order of the building, finished on the given date.
|
EShipType[] |
getBuildableShipTypes() |
Retrieve a list of all the types of ships this yard can build.
|
java.time.LocalDateTime |
getBuildCompleteDate(EShipType type) |
Retrieve the date when the building of a new ship will be finished.
|
java.util.List<IShipDueDate> |
getShipBuildingList() |
Retrieve an immutable list of the ships that are ordered
to be built on this shipyard.
|
java.util.List<IShipDueDate> |
getShipRepairList() |
Retrieve the list of all ships that are to be repaired.
|
java.util.List<IShipDueDate> |
getShipUpgradeList() |
Retrieve the list of all ships that are to be upgraded.
|
void |
initializeExperience() |
|
void |
removeCompletedConstruction(IShip ship) |
Remove the build entry once it is completed.
|
void |
removeCompletedRepair(IShip ship) |
Remove the repair entry once it is completed.
|
void |
removeCompletedUpgrade(IShip ship) |
Remove the upgrade entry once it is completed.
|
public ShipyardState(ICity city)
@PostConstruct public void initializeExperience()
public java.util.List<IShipDueDate> getShipBuildingList()
IShipyardgetShipBuildingList in interface IShipyardpublic java.util.List<IShipDueDate> getShipUpgradeList()
IShipyardgetShipUpgradeList in interface IShipyardpublic void addShipBuildingOrder(IShipDueDate dueDate, java.util.Optional<TimedTask> task)
IShipyardaddShipBuildingOrder in interface IShipyarddueDate - when the ship is finished buildingtask - that is executed on completion.public void cancelShipBuildingOrder(java.time.LocalDateTime finish)
IShipyardcancelShipBuildingOrder in interface IShipyardfinish - datepublic java.util.List<IShipDueDate> getShipRepairList()
IShipyardgetShipRepairList in interface IShipyardpublic void addShipRepairOrder(IShipDueDate dueDate, java.util.Optional<TimedTask> task)
IShipyardaddShipRepairOrder in interface IShipyarddueDate - when the ship is finished repairingtask - that is executed on completion.public int calculateRepairMaterialCosts(IShip ship, int damage)
IShipyardcalculateRepairMaterialCosts in interface IShipyardship - for which to calculate the material costs.damage - of the shippublic int calculateRepairCosts(int repairTime,
int materialCosts)
IShipyardcalculateRepairCosts in interface IShipyardrepairTime - number of days it takes for the repairmaterialCosts - costs of material that are required to be boughtpublic void cancelRepair(IShip ship)
IShipyardcancelRepair in interface IShipyardship - which's repair order is to be canceledpublic void addShipRefitOrder(IShipDueDate dueDate, java.util.Optional<TimedTask> task)
IShipyardaddShipRefitOrder in interface IShipyarddueDate - when the ship is refittedtask - that is executed on completion.public int calculateRefitTime(EShipType type)
IShipyardcalculateRefitTime in interface IShipyardtype - destination levelpublic java.time.LocalDateTime getBuildCompleteDate(EShipType type)
IShipyardgetBuildCompleteDate in interface IShipyardtype - of the ship to be builtpublic int calculateBuildTime(EShipType type)
IShipyardcalculateBuildTime in interface IShipyardtype - ship typetypepublic int calculateRepairTime(EShipType type)
IShipyardcalculateRepairTime in interface IShipyardtype - ship typetypepublic int calculateRefitCosts(EShipType type, int levels)
IShipyardcalculateRefitCosts in interface IShipyardtype - ship type that should be upgradedlevels - number of upgrade levelspublic int calculateConstructionCosts(EShipType type)
IShipyardcalculateConstructionCosts in interface IShipyardtype - of the shippublic EShipType[] getBuildableShipTypes()
IShipyardgetBuildableShipTypes in interface IShipyardpublic void removeCompletedRepair(IShip ship)
IShipyardremoveCompletedRepair in interface IShipyardship - that is to be repaired.public void removeCompletedConstruction(IShip ship)
IShipyardremoveCompletedConstruction in interface IShipyardship - that is to be built.public void removeCompletedUpgrade(IShip ship)
IShipyardremoveCompletedUpgrade in interface IShipyardship - that is to be upgraded.Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.