public interface IDomesticTradeController extends IController
Modifier and Type | Method and Description |
---|---|
void |
acceptTrade(boolean willAccept)
Called by the accept trade overlay when the user either accepts or
rejects a trade.
|
void |
cancelTrade()
Called by the domestic trade overlay when the user cancels a trade.
|
void |
decreaseResourceAmount(ResourceType resource)
Called by the domestic trade overlay when the user decreases the amount
of a resource.
|
void |
increaseResourceAmount(ResourceType resource)
Called by the domestic trade overlay when the user increases the amount
of a resource.
|
void |
sendTradeOffer()
Called by the domestic trade overlay when the user clicks the trade
button.
|
void |
setPlayerToTradeWith(int playerIndex)
Called by the domestic trade overlay when the user selects a player to
trade with.
|
void |
setResourceToReceive(ResourceType resource)
Called by the domestic trade overlay when the user selects a resource to
be received.
|
void |
setResourceToSend(ResourceType resource)
Called by the domestic trade overlay when the user selects a resource to
be sent.
|
void |
startTrade()
Called by the domestic trade view when the user clicks the domestic trade
button.
|
void |
unsetResource(ResourceType resource)
Called by the domestic trade overlay when user selects "none" for a
resource.
|
getView
void startTrade()
void decreaseResourceAmount(ResourceType resource)
resource
- The resource whose amount is being decreasedvoid increaseResourceAmount(ResourceType resource)
resource
- The resource whose amount is being increasedvoid sendTradeOffer()
void setPlayerToTradeWith(int playerIndex)
playerIndex
- The index [0, 3] of the selected trading partner, or -1 if
"None" was selectedvoid setResourceToReceive(ResourceType resource)
resource
- The resource to be receivedvoid setResourceToSend(ResourceType resource)
resource
- The resource to be sentvoid unsetResource(ResourceType resource)
resource
- The resource for which "none" was selectedvoid cancelTrade()
void acceptTrade(boolean willAccept)
willAccept
- Whether or not the user accepted the trade