Class CheckedBuyTradeStep
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.tradesteps.BaseBuyTradeStep
-
- ch.sahits.game.openpatrician.engine.player.tradesteps.CheckedBuyTradeStep
-
- All Implemented Interfaces:
ITradeStep
public class CheckedBuyTradeStep extends BaseBuyTradeStep
Implements the trade step to by the some goods up to a maximum buy price. It also checks that the ware is only loaded up to a certain maximum of the space on the ship.
-
-
Field Summary
Fields Modifier and Type Field Description private long
cost
private boolean
executeNext
-
Constructor Summary
Constructors Constructor Description CheckedBuyTradeStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute()
Execute the trade step.java.lang.String
toString()
-
Methods inherited from class ch.sahits.game.openpatrician.engine.player.tradesteps.BaseBuyTradeStep
transferFromOfficeOrBuyFromCity
-
-
-
-
Method Detail
-
execute
public boolean execute()
Description copied from interface:ITradeStep
Execute the trade step.- 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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-