Class BuyTradingOfficeTradeStep
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.tradesteps.BuyTradingOfficeTradeStep
-
- All Implemented Interfaces:
ITradeStep
public class BuyTradingOfficeTradeStep extends java.lang.Object implements ITradeStep
Buy trade step to buy wares and store it in the trading office.- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Dec 21, 2016
-
-
Field Summary
Fields Modifier and Type Field Description private ICity
city
private int
maxBuyPrice
private long
retainCash
private TradeService
tradeService
private ITradingOffice
tradingOffice
private IWare
ware
-
Constructor Summary
Constructors Constructor Description BuyTradingOfficeTradeStep()
-
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
-
tradingOffice
private ITradingOffice tradingOffice
-
ware
private IWare ware
-
tradeService
@Autowired private TradeService tradeService
-
maxBuyPrice
private int maxBuyPrice
-
retainCash
private long retainCash
-
-
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
-
-