Class 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 Detail

      • executeNext

        private boolean executeNext
      • cost

        private long cost
    • Constructor Detail

      • CheckedBuyTradeStep

        public CheckedBuyTradeStep()
    • 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 class java.lang.Object