Class AmountBasedAggregatedDumpTradeStep
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.tradesteps.AbstractAggregateDumpTradeStep
-
- ch.sahits.game.openpatrician.engine.player.tradesteps.AmountBasedAggregatedDumpTradeStep
-
- All Implemented Interfaces:
ITradeStep
public class AmountBasedAggregatedDumpTradeStep extends AbstractAggregateDumpTradeStep
This dump sell step is conditional based on the amount of loaded wares on the ship. It is best used with a preceding sell step and then use this dump step to check if there is too much wares loaded and to dump them.- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Jul 24, 2016
-
-
Field Summary
Fields Modifier and Type Field Description private int
maxAmount
Maximal amount that should be on the ship.
-
Constructor Summary
Constructors Constructor Description AmountBasedAggregatedDumpTradeStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute()
Execute the trade step.-
Methods inherited from class ch.sahits.game.openpatrician.engine.player.tradesteps.AbstractAggregateDumpTradeStep
addSellStep, toString
-
-
-
-
Method Detail
-
execute
public boolean execute()
Description copied from interface:ITradeStep
Execute the trade step.- Specified by:
execute
in interfaceITradeStep
- Overrides:
execute
in classAbstractAggregateDumpTradeStep
- Returns:
- true if the next step can be executed on completion or if the execution is triggered by the arrival of the ship in the next port.
-
-