Modifier and Type | Method and Description |
---|---|
ResourceType |
ResourceCardChooser.getSelectedResourceCard() |
Modifier and Type | Method and Description |
---|---|
void |
IDevCardController.playMonopolyCard(ResourceType resource)
This method is called when the user plays a monopoly development card.
|
void |
DevCardController.playMonopolyCard(ResourceType resource) |
void |
IDevCardController.playYearOfPlentyCard(ResourceType resource1,
ResourceType resource2)
This method is called when the user plays a year of plenty development
card.
|
void |
DevCardController.playYearOfPlentyCard(ResourceType resource1,
ResourceType resource2) |
Modifier and Type | Field and Description |
---|---|
private ResourceType |
DiscardView.Resource._type |
Modifier and Type | Field and Description |
---|---|
private java.util.List<ResourceType> |
DiscardView.resourceList |
private java.util.Map<ResourceType,DiscardView.Resource> |
DiscardView.resources |
Modifier and Type | Method and Description |
---|---|
ResourceType |
DiscardView.Resource.getType() |
Modifier and Type | Method and Description |
---|---|
void |
IDiscardController.decreaseAmount(ResourceType resource)
This method is called when the user decreases the amount of the specified
resource.
|
void |
DiscardController.decreaseAmount(ResourceType resource) |
void |
IDiscardController.increaseAmount(ResourceType resource)
This method is called when the user increases the amount of the specified
resource.
|
void |
DiscardController.increaseAmount(ResourceType resource) |
void |
IDiscardView.setResourceAmountChangeEnabled(ResourceType resource,
boolean increase,
boolean decrease)
Used to specify whether or not the discard amount of the specified
resource can be increased and decreased.
|
void |
DiscardView.setResourceAmountChangeEnabled(ResourceType resource,
boolean increase,
boolean decrease)
Used to specify whether or not the discard amount of the specified
resource can be increased and decreased.
|
void |
IDiscardView.setResourceDiscardAmount(ResourceType resource,
int amount)
Sets the discard amount displayed for the specified resource.
|
void |
DiscardView.setResourceDiscardAmount(ResourceType resource,
int amount)
Sets the discard amount displayed for the specified resource.
|
void |
IDiscardView.setResourceMaxAmount(ResourceType resource,
int maxAmount)
Sets the maximum amount displayed for the specified resource.
|
void |
DiscardView.setResourceMaxAmount(ResourceType resource,
int maxAmount)
Sets the maximum amount displayed for the specified resource.
|
void |
DiscardView.Resource.setType(ResourceType type) |
Constructor and Description |
---|
Resource(ResourceType type) |
Resource(ResourceType type,
int maxAmount,
int discardAmount,
boolean canIncrease,
boolean canDecrease) |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<ResourceType,java.util.ArrayList<javax.swing.JButton>> |
DomesticTradeOverlay.resourceButtonsMap |
private java.util.Map<ResourceType,javax.swing.JLabel> |
DomesticTradeOverlay.resourceCounts |
private java.util.Map<ResourceType,javax.swing.JPanel> |
DomesticTradeOverlay.upDownPanelByResourceType |
Modifier and Type | Method and Description |
---|---|
void |
IAcceptTradeOverlay.addGetResource(ResourceType resource,
int amount)
Adds a resource that the player will receive to the view.
|
void |
AcceptTradeOverlay.addGetResource(ResourceType resource,
int amount) |
void |
IAcceptTradeOverlay.addGiveResource(ResourceType resource,
int amount)
Adds a resource that the player will give to the view.
|
void |
AcceptTradeOverlay.addGiveResource(ResourceType resource,
int amount) |
void |
IDomesticTradeController.decreaseResourceAmount(ResourceType resource)
Called by the domestic trade overlay when the user decreases the amount
of a resource.
|
void |
DomesticTradeController.decreaseResourceAmount(ResourceType resource) |
private void |
DomesticTradeController.enableUpDownButtonsForReceiveResource(ResourceType type)
Handles button enabling/disabling for receive resources
|
private void |
DomesticTradeController.enableUpDownButtonsForSendResource(ResourceType type)
Handles button enabling/disabling for send resources
|
private int |
DomesticTradeController.getResourceIndex(ResourceType type)
Helper method for converting a resource type into an index of the resource
to trade array
|
void |
IDomesticTradeController.increaseResourceAmount(ResourceType resource)
Called by the domestic trade overlay when the user increases the amount
of a resource.
|
void |
DomesticTradeController.increaseResourceAmount(ResourceType resource) |
void |
IDomesticTradeOverlay.setResourceAmount(ResourceType resource,
java.lang.String amount)
Sets the amount displayed for a resource.
|
void |
DomesticTradeOverlay.setResourceAmount(ResourceType resource,
java.lang.String amount) |
void |
IDomesticTradeOverlay.setResourceAmountChangeEnabled(ResourceType resource,
boolean canIncrease,
boolean canDecrease)
Enables or disables the ability to increase and decrease a resource's
amount.
|
void |
DomesticTradeOverlay.setResourceAmountChangeEnabled(ResourceType resource,
boolean canIncrease,
boolean canDecrease) |
void |
IDomesticTradeController.setResourceToReceive(ResourceType resource)
Called by the domestic trade overlay when the user selects a resource to
be received.
|
void |
DomesticTradeController.setResourceToReceive(ResourceType resource) |
void |
IDomesticTradeController.setResourceToSend(ResourceType resource)
Called by the domestic trade overlay when the user selects a resource to
be sent.
|
void |
DomesticTradeController.setResourceToSend(ResourceType resource) |
private javax.swing.JPanel |
DomesticTradeOverlay.setupResourceTile(java.lang.String imageFilePath,
ResourceType resourceType) |
private javax.swing.JPanel |
DomesticTradeOverlay.setupUpDownButtonsPanel(ResourceType resourceType) |
void |
IDomesticTradeController.unsetResource(ResourceType resource)
Called by the domestic trade overlay when user selects "none" for a
resource.
|
void |
DomesticTradeController.unsetResource(ResourceType resource) |
private void |
DomesticTradeController.updateUpDownForResource(ResourceType type)
Called whenever the state of the upDown buttons has changed, disables or enables them
after checking context
|
Modifier and Type | Field and Description |
---|---|
(package private) ResourceType[] |
MaritimeTradeOverlay.getAvailables |
private ResourceType |
MaritimeTradeController.getResource |
(package private) ResourceType[] |
MaritimeTradeOverlay.giveAvailables |
private ResourceType |
MaritimeTradeController.giveResource |
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<ResourceType> |
MaritimeTradeController.resourcesPlayerCanGet |
private java.util.ArrayList<ResourceType> |
MaritimeTradeController.resourcesPlayerCanGive |
Modifier and Type | Method and Description |
---|---|
private int |
MaritimeTradeController.getResourceTradeRate(ResourceType type) |
void |
MaritimeTradeOverlay.selectGetOption(ResourceType selectedResource,
int amount) |
void |
IMaritimeTradeOverlay.selectGetOption(ResourceType selectedResource,
int amount)
Selects the resource the user has selected to receive.
|
void |
MaritimeTradeOverlay.selectGiveOption(ResourceType selectedResource,
int amount) |
void |
IMaritimeTradeOverlay.selectGiveOption(ResourceType selectedResource,
int amount)
Selects the resource the user has selected to give.
|
void |
MaritimeTradeController.setGetResource(ResourceType resource) |
void |
IMaritimeTradeController.setGetResource(ResourceType resource)
Called when the user selects the resource to get.
|
void |
MaritimeTradeController.setGiveResource(ResourceType resource) |
void |
IMaritimeTradeController.setGiveResource(ResourceType resource)
Called when the user selects the resource to give.
|
void |
MaritimeTradeOverlay.showGetOptions(ResourceType[] enabledResources) |
void |
IMaritimeTradeOverlay.showGetOptions(ResourceType[] enabledResources)
Shows all the "get" resources, enabling the ones the player can receive,
and disabling the ones he can't.
|
void |
MaritimeTradeOverlay.showGiveOptions(ResourceType[] enabledResources) |
void |
IMaritimeTradeOverlay.showGiveOptions(ResourceType[] enabledResources)
Shows all the "give" resources, enabling the ones the player can give,
and disabling the ones he can't.
|
Modifier and Type | Method and Description |
---|---|
void |
ClientGameManager.maritimeTradeCurrentPlayer(int ratio,
ResourceType inputResource,
ResourceType outputResource)
Takes resource from the bank and gives them to the current player
|
int |
ClientGameManager.playerResourceCount(ResourceType type)
Gets the number of resources for the player
|
boolean |
ClientGameManager.PlayMonopoly(ResourceType resource)
Plays the monopoly card for the current player
|
boolean |
ClientGameManager.PlayYearOfPlenty(ResourceType resource1,
ResourceType resource2)
Plays the road builder card for the current player
|
Modifier and Type | Method and Description |
---|---|
GameModel |
ServerProxy.maritimeTrade(int ratio,
ResourceType inputResource,
ResourceType outputResource)
Notifies the server that the user has decided to initiate a maritime trade
|
NetGameModel |
RealEarlyServerProxy.maritimeTrade(int ratio,
ResourceType inputResource,
ResourceType outputResource) |
NetGameModel |
MockServerProxy.maritimeTrade(int ratio,
ResourceType inputResource,
ResourceType outputResource)
Notifies the server that the user has decided to initiate a maritime trade
|
GameModel |
GSONServerProxy.maritimeTrade(int ratio,
ResourceType inputResource,
ResourceType outputResource) |
NetGameModel |
EarlyServerProxy.maritimeTrade(int ratio,
ResourceType inputResource,
ResourceType outputResource)
Notifies the server that the user has decided to initiate a maritime trade
|
GameModel |
ServerProxy.monopolyCard(ResourceType resource)
Notifies the server that the user has played a monopoly card
|
NetGameModel |
RealEarlyServerProxy.monopolyCard(ResourceType resource) |
NetGameModel |
MockServerProxy.monopolyCard(ResourceType resource)
Notifies the server that the user has played a monopoly card
|
GameModel |
GSONServerProxy.monopolyCard(ResourceType resource) |
NetGameModel |
EarlyServerProxy.monopolyCard(ResourceType resource)
Notifies the server that the user has played a monopoly card
|
GameModel |
ServerProxy.yearOfPlentyCard(ResourceType resource1,
ResourceType resource2)
Notifies the server that the user has played a year of plenty card
|
NetGameModel |
RealEarlyServerProxy.yearOfPlentyCard(ResourceType resource1,
ResourceType resource2) |
NetGameModel |
MockServerProxy.yearOfPlentyCard(ResourceType resource1,
ResourceType resource2)
Notifies the server that the user has played a year of plenty card
|
GameModel |
GSONServerProxy.yearOfPlentyCard(ResourceType resource1,
ResourceType resource2) |
NetGameModel |
EarlyServerProxy.yearOfPlentyCard(ResourceType resource1,
ResourceType resource2)
Notifies the server that the user has played a year of plenty card
|
Modifier and Type | Field and Description |
---|---|
private ResourceType |
MovesMaritimeTradeCommand.input |
private ResourceType |
MovesCommandFactory.MaritimeTradeBuilder.input |
private ResourceType |
MovesMaritimeTradeCommand.output |
private ResourceType |
MovesCommandFactory.MaritimeTradeBuilder.output |
private ResourceType |
MovesMonopolyCommand.resource |
private ResourceType |
MovesCommandFactory.MonopolyBuilder.resource |
private ResourceType |
MovesYearOfPlentyCommand.resource1 |
private ResourceType |
MovesCommandFactory.YearOfPlentyBuilder.resource1 |
private ResourceType |
MovesYearOfPlentyCommand.resource2 |
private ResourceType |
MovesCommandFactory.YearOfPlentyBuilder.resource2 |
Constructor and Description |
---|
MovesMaritimeTradeCommand(NetworkCookie cookie,
int playerIndex,
int ratio,
ResourceType input,
ResourceType output)
Creates a command to perform a maritime trade.
|
MovesMonopolyCommand(NetworkCookie cookie,
int playerIndex,
ResourceType resource)
Creates a command object to play the monopoly card.
|
MovesYearOfPlentyCommand(NetworkCookie cookie,
int playerIndex,
ResourceType resource1,
ResourceType resource2)
Creates a command object that plays the Year of Plenty card.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ResourceType |
ServerGameManager.takeRandomResourceCard(int receiver,
int giver)
takes a random resource from one player and gives it to another
|
protected ResourceType |
RealServerGameManager.takeRandomResourceCard(int receiver,
int giver) |
protected ResourceType |
MockServerGame.takeRandomResourceCard(int receiver,
int giver) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
ServerGameManager.ServerMaritimeTrading(int playerIndex,
int ratio,
ResourceType input,
ResourceType output)
trades in the maritime
|
boolean |
RealServerGameManager.ServerMaritimeTrading(int playerIndex,
int ratio,
ResourceType input,
ResourceType output) |
boolean |
MockServerGame.ServerMaritimeTrading(int playerIndex,
int ratio,
ResourceType input,
ResourceType output) |
abstract boolean |
ServerGameManager.ServerMonopoly(int playerIndex,
ResourceType res1)
plays a monopoly card
|
boolean |
RealServerGameManager.ServerMonopoly(int playerIndex,
ResourceType res1) |
boolean |
MockServerGame.ServerMonopoly(int playerIndex,
ResourceType res1) |
abstract boolean |
ServerGameManager.ServerYearOfPlenty(int playerIndex,
ResourceType res1,
ResourceType res2)
plays a year of plenty card
|
boolean |
RealServerGameManager.ServerYearOfPlenty(int playerIndex,
ResourceType res1,
ResourceType res2) |
boolean |
MockServerGame.ServerYearOfPlenty(int playerIndex,
ResourceType res1,
ResourceType res2) |
Modifier and Type | Method and Description |
---|---|
static ResourceType |
ResourceType.fromHex(HexType hex) |
static ResourceType |
ResourceType.fromString(java.lang.String s) |
static ResourceType |
ResourceType.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ResourceType[] |
ResourceType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static PortType |
PortType.GetFromResource(ResourceType type) |
static HexType |
HexType.GetFromResource(ResourceType type) |
static boolean |
PortType.MatchedResource(PortType port,
ResourceType type) |
static java.lang.String |
ResourceType.toString(ResourceType type) |
Modifier and Type | Method and Description |
---|---|
ResourceType |
Bank.takeRandomResource()
Gives a random resource from this player to the bank
|
Modifier and Type | Method and Description |
---|---|
boolean |
GameManager.CanDiscardCards(int playerIndex,
ResourceType type,
int amount)
See if a player can discard cards
|
int |
GameManager.getBankResourceCount(ResourceType resourceType)
Returns the number of the requested type of resource held by the bank
|
int |
OfferedTrade.getOfferedResourceAmount(ResourceType type) |
private PortType |
Translate.GetPortType(int ratio,
ResourceType type)
Helper function for fromNetMap function
|
void |
Bank.getResource(ResourceType type)
Attempts to get a resource from the bank
|
void |
Bank.getResource(ResourceType type,
int amount)
Gets a resource of the type requested at the amount requested
|
int |
Bank.getResourceCount(ResourceType type)
returns the number of resources for a specified type
|
int |
GameManager.getTradeRatio(int playerIndex,
ResourceType type)
Gets the trade ratio for a given resource for a player
|
int |
OfferedTrade.getWantedResourceAmount(ResourceType type) |
void |
Bank.giveResource(ResourceType type)
Give a single resource of type
|
void |
Bank.giveResource(ResourceType type,
int amount)
Gives the bank amount of type resource of type
|
int |
GameManager.playerResourceCount(int playerIndex,
ResourceType type)
Gets the number of resources for the player
|
void |
OfferedTrade.setOfferedResourceAmount(ResourceType type,
int amount) |
void |
OfferedTrade.setWantedResourceAmount(ResourceType type,
int amount) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
Serializer.sMaritimeTradeReq(int playerIndex,
int ratio,
ResourceType inputResource,
ResourceType outputResource)
Serializes a request to perform a maritime trade
|
java.lang.String |
JSONSerializer.sMaritimeTradeReq(int playerIndex,
int ratio,
ResourceType inputResource,
ResourceType outputResource) |
java.lang.String |
Serializer.sMonopolyCardReq(int playerIndex,
ResourceType resource)
Serializes a request to play a monopoly card
|
java.lang.String |
JSONSerializer.sMonopolyCardReq(int playerIndex,
ResourceType resource) |
java.lang.String |
Serializer.sYearOfPlentyCardReq(int playerIndex,
ResourceType resource1,
ResourceType resource2)
Serializes a request to play a Year of Plenty card
|
java.lang.String |
JSONSerializer.sYearOfPlentyCardReq(int playerIndex,
ResourceType resource1,
ResourceType resource2) |
Modifier and Type | Field and Description |
---|---|
private ResourceType |
PMaritimeTrade.inputResource |
private ResourceType |
PMaritimeTrade.outputReseource |
private ResourceType |
PMonopolyCard.resource |
private ResourceType |
PYearOfPlentyCard.resource1 |
private ResourceType |
PYearOfPlentyCard.resource2 |
Modifier and Type | Method and Description |
---|---|
ResourceType |
PMaritimeTrade.getInputResource() |
ResourceType |
PMaritimeTrade.getOutputReseource() |
ResourceType |
PMonopolyCard.getResource() |
ResourceType |
PYearOfPlentyCard.getResource1() |
ResourceType |
PYearOfPlentyCard.getResource2() |
Modifier and Type | Method and Description |
---|---|
void |
PMaritimeTrade.setInputResource(ResourceType inputResource) |
void |
PMaritimeTrade.setOutputResource(ResourceType outputReseource) |
void |
PMonopolyCard.setResource(ResourceType resource) |
void |
PYearOfPlentyCard.setResource1(ResourceType resource1) |
void |
PYearOfPlentyCard.setResource2(ResourceType resource2) |
Constructor and Description |
---|
PMaritimeTrade(int ratio,
ResourceType inputResource,
ResourceType outputReseource) |
PMonopolyCard(ResourceType resource) |
PYearOfPlentyCard(ResourceType resource1,
ResourceType resource2) |
Modifier and Type | Field and Description |
---|---|
(package private) ResourceType |
NetPort.resource |
(package private) ResourceType |
NetHex.resourceType |
Modifier and Type | Method and Description |
---|---|
ResourceType |
NetPort.getResource() |
ResourceType |
NetHex.getResourceType() |
Modifier and Type | Method and Description |
---|---|
void |
NetPort.setResource(ResourceType resource) |
void |
NetHex.setResourceType(ResourceType resourceType) |