public class MaritimeTradeController extends Controller implements IMaritimeTradeController
Constructor and Description |
---|
MaritimeTradeController(IMaritimeTradeView tradeView,
IMaritimeTradeOverlay tradeOverlay) |
Modifier and Type | Method and Description |
---|---|
void |
cancelTrade()
Called by the maritime trade overlay when the user cancels a trade.
|
IMaritimeTradeOverlay |
getTradeOverlay() |
IMaritimeTradeView |
getTradeView() |
void |
makeTrade()
Make the specified trade with the bank.
|
void |
setGetResource(ResourceType resource)
Called when the user selects the resource to get.
|
void |
setGiveResource(ResourceType resource)
Called when the user selects the resource to give.
|
void |
setTradeOverlay(IMaritimeTradeOverlay tradeOverlay) |
void |
startTrade()
Called by the maritime trade view when the user clicks the maritime trade
button.
|
void |
unsetGetValue()
Called when the player "undoes" their get selection.
|
void |
unsetGiveValue()
Called when the player "undoes" their give selection.
|
getView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getView
public MaritimeTradeController(IMaritimeTradeView tradeView, IMaritimeTradeOverlay tradeOverlay)
public IMaritimeTradeView getTradeView()
public IMaritimeTradeOverlay getTradeOverlay()
public void setTradeOverlay(IMaritimeTradeOverlay tradeOverlay)
public void startTrade()
IMaritimeTradeController
startTrade
in interface IMaritimeTradeController
public void makeTrade()
IMaritimeTradeController
makeTrade
in interface IMaritimeTradeController
public void cancelTrade()
IMaritimeTradeController
cancelTrade
in interface IMaritimeTradeController
public void setGetResource(ResourceType resource)
IMaritimeTradeController
setGetResource
in interface IMaritimeTradeController
resource
- The selected "get" resourcepublic void setGiveResource(ResourceType resource)
IMaritimeTradeController
setGiveResource
in interface IMaritimeTradeController
resource
- The selected "give" resourcepublic void unsetGetValue()
IMaritimeTradeController
unsetGetValue
in interface IMaritimeTradeController
public void unsetGiveValue()
IMaritimeTradeController
unsetGiveValue
in interface IMaritimeTradeController