Uses of Class
soc.game.SOCResourceSet

Packages that use SOCResourceSet
soc.client   
soc.game   
soc.message   
soc.robot   
soc.server   
 

Uses of SOCResourceSet in soc.client
 

Fields in soc.client declared as SOCResourceSet
(package private)  SOCResourceSet TradeOfferPanel.OfferPanel.give
           
(package private)  SOCResourceSet TradeOfferPanel.OfferPanel.get
           
 

Methods in soc.client with parameters of type SOCResourceSet
 void SOCPlayerClient.discard(SOCGame ga, SOCResourceSet rs)
          the user wants to discard
 void SOCPlayerClient.bankTrade(SOCGame ga, SOCResourceSet give, SOCResourceSet get)
          the user wants to trade with the bank
 void SOCPlayerClient.discoveryPick(SOCGame ga, SOCResourceSet rscs)
          the user picked 2 resources to discover
 void SOCDisplaylessPlayerClient.discard(SOCGame ga, SOCResourceSet rs)
          the user wants to discard
 void SOCDisplaylessPlayerClient.bankTrade(SOCGame ga, SOCResourceSet give, SOCResourceSet get)
          the user wants to trade with the bank
 void SOCDisplaylessPlayerClient.discoveryPick(SOCGame ga, SOCResourceSet rscs)
          the user picked 2 resources to discover
 

Uses of SOCResourceSet in soc.game
 

Fields in soc.game declared as SOCResourceSet
(package private)  SOCResourceSet SOCTradeOffer.give
           
(package private)  SOCResourceSet SOCTradeOffer.get
           
static SOCResourceSet SOCResourceSet.EMPTY_SET
          Resource set with zero of each resource type
private  SOCResourceSet SOCPlayer.resources
          how many of each resource this player has
static SOCResourceSet SOCGame.EMPTY_RESOURCES
          the set of resources a player needs to build a settlement
static SOCResourceSet SOCGame.SETTLEMENT_SET
          the set of resources a player needs to build a settlement
static SOCResourceSet SOCGame.ROAD_SET
          the set of resources a player needs to build a road
static SOCResourceSet SOCGame.CITY_SET
          the set of resources a player needs to build a city
static SOCResourceSet SOCGame.CARD_SET
          the set of resources a player needs to buy a development card
private  SOCResourceSet SOCForceEndTurnResult.gainLoss
          Resources gained (returned to cancel piece placement) or lost (discarded), or null.
 

Methods in soc.game that return SOCResourceSet
 SOCResourceSet SOCTradeOffer.getGiveSet()
           
 SOCResourceSet SOCTradeOffer.getGetSet()
           
 SOCResourceSet SOCResourceSet.copy()
           
 SOCResourceSet SOCPlayer.getResources()
           
 SOCResourceSet SOCGame.playerDiscardRandom(int pn)
          Force this non-current player to discard randomly.
 SOCResourceSet SOCGame.getResourcesGainedFromRoll(SOCPlayer player, int roll)
          figure out what resources a player would get on a given roll
 SOCResourceSet SOCForceEndTurnResult.getResourcesGainedLost()
          Get the resources gained (returned to cancel piece placement) or lost (discarded), if any.
 

Methods in soc.game with parameters of type SOCResourceSet
 void SOCResourceSet.add(SOCResourceSet rs)
          add an entire resource set's amounts into this set.
 void SOCResourceSet.subtract(SOCResourceSet rs)
          subtract an entire resource set.
static boolean SOCResourceSet.gte(SOCResourceSet a, SOCResourceSet b)
           
static boolean SOCResourceSet.lte(SOCResourceSet a, SOCResourceSet b)
           
 boolean SOCResourceSet.contains(SOCResourceSet sub)
           
 void SOCResourceSet.setAmounts(SOCResourceSet set)
          copy a resource set into this one.
static void SOCGame.discardPickRandom(SOCResourceSet fromHand, int numDiscards, SOCResourceSet discards, java.util.Random rand)
          Choose discards at random; does not actually discard anything.
 boolean SOCGame.canDiscard(int pn, SOCResourceSet rs)
           
 void SOCGame.discard(int pn, SOCResourceSet rs)
          A player is discarding resources.
 boolean SOCGame.canMakeBankTrade(SOCResourceSet give, SOCResourceSet get)
           
 void SOCGame.makeBankTrade(SOCResourceSet give, SOCResourceSet get)
          perform a bank trade
 boolean SOCGame.canDoDiscoveryAction(SOCResourceSet pick)
           
 void SOCGame.doDiscoveryAction(SOCResourceSet pick)
          perform the Discovery card action
 

Constructors in soc.game with parameters of type SOCResourceSet
SOCTradeOffer(java.lang.String game, int from, boolean[] to, SOCResourceSet give, SOCResourceSet get)
          The constructor for a SOCTradeOffer
SOCForceEndTurnResult(int res, SOCResourceSet gained)
          Creates a new SOCForceEndTurnResult object, with resources gained.
SOCForceEndTurnResult(int res, SOCResourceSet gainedLost, boolean isLoss)
          Creates a new SOCForceEndTurnResult object, with resources gained/lost.
 

Uses of SOCResourceSet in soc.message
 

Fields in soc.message declared as SOCResourceSet
private  SOCResourceSet SOCDiscoveryPick.resources
          The chosen resources
private  SOCResourceSet SOCDiscard.resources
          The set of resources being discarded
private  SOCResourceSet SOCBankTrade.give
          The set of resources being given to the bank
private  SOCResourceSet SOCBankTrade.get
          The set of resources being taken from the bank
 

Methods in soc.message that return SOCResourceSet
 SOCResourceSet SOCDiscoveryPick.getResources()
           
 SOCResourceSet SOCDiscard.getResources()
           
 SOCResourceSet SOCBankTrade.getGiveSet()
           
 SOCResourceSet SOCBankTrade.getGetSet()
           
 

Methods in soc.message with parameters of type SOCResourceSet
static java.lang.String SOCDiscoveryPick.toCmd(java.lang.String ga, SOCResourceSet rs)
           
static java.lang.String SOCDiscard.toCmd(java.lang.String ga, SOCResourceSet rs)
          DISCARD sep game sep2 clay sep2 ore sep2 sheep sep2 wheat sep2 wood sep2 unknown
static java.lang.String SOCBankTrade.toCmd(java.lang.String ga, SOCResourceSet give, SOCResourceSet get)
           
 

Constructors in soc.message with parameters of type SOCResourceSet
SOCDiscoveryPick(java.lang.String ga, SOCResourceSet rs)
          Create a DiscoveryPick message.
SOCDiscard(java.lang.String ga, int pn, SOCResourceSet rs)
          Create a Discard message.
SOCBankTrade(java.lang.String ga, SOCResourceSet give, SOCResourceSet get)
          Create a BankTrade message.
 

Uses of SOCResourceSet in soc.robot
 

Fields in soc.robot declared as SOCResourceSet
(package private)  SOCResourceSet SOCTradeTree.resourceSet
           
protected  SOCResourceSet SOCRobotBrain.resourceChoices
          these are the two resources that we want when we play a discovery dev card
(package private)  SOCResourceSet SOCResSetBuildTypePair.resources
          the resource set
(package private)  SOCResourceSet SOCResSetBuildTimePair.resources
          the resource set
(package private)  SOCResourceSet[] SOCBuildingSpeedEstimate.resourcesForRoll
           
 

Methods in soc.robot that return SOCResourceSet
 SOCResourceSet SOCTradeTree.getResourceSet()
           
 SOCResourceSet SOCResSetBuildTypePair.getResources()
           
 SOCResourceSet SOCResSetBuildTimePair.getResources()
           
 

Methods in soc.robot with parameters of type SOCResourceSet
protected  SOCTradeOffer SOCRobotNegotiator.makeOfferAux(SOCResourceSet giveResourceSet, SOCResourceSet getResourceSet, int neededResource)
          aux function for make offer
protected  int SOCRobotNegotiator.getETAToTargetResources(SOCPlayer player, SOCResourceSet targetResources, SOCResourceSet giveSet, SOCResourceSet getSet, SOCBuildingSpeedEstimate estimate)
          another aux function this one returns the number of rolls until we reach the target given a possible offer
 SOCTradeOffer SOCRobotNegotiator.getOfferToBank(SOCResourceSet targetResources, SOCResourceSet ourResources)
           
 SOCTradeOffer SOCRobotNegotiator.getOfferToBank(SOCResourceSet targetResources)
           
protected  int SOCRobotBrain.scoreTradeOutcome(SOCResourceSet tradeOutcome)
          evaluate a trade outcome by calculating how much you could build with it
protected  boolean SOCRobotBrain.tradeToTarget2(SOCResourceSet targetResources)
          make trades to get the target resources
protected  void SOCRobotBrain.chooseFreeResources(SOCResourceSet targetResources)
          this means that we want to play a discovery development card
 int[] SOCBuildingSpeedEstimate.getEstimatesFromNowAccurate(SOCResourceSet resources, boolean[] ports)
           
 int[] SOCBuildingSpeedEstimate.getEstimatesFromNowFast(SOCResourceSet resources, boolean[] ports)
           
protected  SOCResSetBuildTimePair SOCBuildingSpeedEstimate.calculateRollsFast(SOCResourceSet startingResources, SOCResourceSet targetResources, int cutoff, boolean[] ports)
          this figures out how many rolls it would take this player to get the target set of resources given a starting set
protected  SOCResSetBuildTimePair SOCBuildingSpeedEstimate.calculateRollsAccurate(SOCResourceSet startingResources, SOCResourceSet targetResources, int cutoff, boolean[] ports)
          this figures out how many rolls it would take this player to get the target set of resources given a starting set
 

Constructors in soc.robot with parameters of type SOCResourceSet
SOCTradeTree(SOCResourceSet set, SOCTradeTree par)
          this is a constructor
SOCTradeTree(SOCResourceSet set)
          this is a constructor
SOCResSetBuildTypePair(SOCResourceSet rs, int bt)
          the constructor
SOCResSetBuildTimePair(SOCResourceSet rs, int bt)
          the constructor
 

Uses of SOCResourceSet in soc.server
 

Methods in soc.server with parameters of type SOCResourceSet
protected  void SOCServer.reportBankTrade(SOCGame ga, SOCResourceSet give, SOCResourceSet get)
          report that the current player traded with the bank or a port, using SOCPlayerElement and SOCGameTextMsg messages.
private  void SOCServer.reportRsrcGainLoss(java.lang.String gaName, SOCResourceSet rset, boolean isLoss, int mainPlayer, int tradingPlayer, java.lang.StringBuffer message, StringConnection playerConn)
          Report the resources gained/lost by a player, and optionally (for trading) lost/gained by a second player.