Class CheckedTransferToOfficeTradeStep
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.tradesteps.CheckedTransferToOfficeTradeStep
-
- All Implemented Interfaces:
ITradeStep
public class CheckedTransferToOfficeTradeStep extends java.lang.Object implements ITradeStep
Trade step for transferring certain amounts of wares to the store if it can be stored and there is a store manager, to sell them. If there is no trading office or store manager nothing happens.- Author:
- Andi Hotz, (c) Sahits GmbH, 2017 Created on Oct 20, 2017
-
-
Field Summary
Fields Modifier and Type Field Description private ICity
city
private TradeService
tradeService
private java.util.Map<IWare,java.lang.Integer>
transferAmounts
private INavigableVessel
vessel
-
Constructor Summary
Constructors Constructor Description CheckedTransferToOfficeTradeStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute()
Execute the trade step.java.lang.String
toString()
-
-
-
Field Detail
-
city
private ICity city
-
vessel
private INavigableVessel vessel
-
transferAmounts
private java.util.Map<IWare,java.lang.Integer> transferAmounts
-
tradeService
@Autowired private TradeService tradeService
-
-
Method Detail
-
execute
public boolean execute()
Description copied from interface:ITradeStep
Execute the trade step.- Specified by:
execute
in interfaceITradeStep
- 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
-
-