|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
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 | |
---|---|
private SOCResourceSet |
SOCHandPanel.bankGet
Bank or port trade's give/get resource info; used for Undo. |
private SOCResourceSet |
SOCHandPanel.bankGive
Bank or port trade's give/get resource info; used for Undo. |
(package private) SOCResourceSet |
TradeOfferPanel.OfferPanel.get
|
(package private) SOCResourceSet |
TradeOfferPanel.OfferPanel.give
|
Methods in soc.client with parameters of type SOCResourceSet | |
---|---|
void |
SOCPlayerClient.GameManager.bankTrade(SOCGame ga,
SOCResourceSet give,
SOCResourceSet get)
the user wants to trade with the bank or a port. |
void |
SOCDisplaylessPlayerClient.bankTrade(SOCGame ga,
SOCResourceSet give,
SOCResourceSet get)
the user wants to trade with the bank or a port. |
void |
SOCPlayerClient.GameManager.discard(SOCGame ga,
SOCResourceSet rs)
the user wants to discard |
void |
SOCDisplaylessPlayerClient.discard(SOCGame ga,
SOCResourceSet rs)
the user wants to discard |
void |
SOCPlayerClient.GameManager.discoveryPick(SOCGame ga,
SOCResourceSet rscs)
the user picked 2 resources to discover |
void |
SOCDisplaylessPlayerClient.discoveryPick(SOCGame ga,
SOCResourceSet rscs)
the user picked 2 resources to discover |
void |
SOCDisplaylessPlayerClient.pickFreeResources(SOCGame ga,
SOCResourceSet rs)
The user wants to pick these resources to gain from the gold hex. |
void |
SOCPlayerClient.GameManager.pickResources(SOCGame ga,
SOCResourceSet rs)
The user has picked these resources to gain from the gold hex. |
Method parameters in soc.client with type arguments of type SOCResourceSet | |
---|---|
void |
SOCPlayerInterface.ClientBridge.diceRolledResources(java.util.List<java.lang.Integer> pnum,
java.util.List<SOCResourceSet> rsrc)
|
void |
PlayerClientListener.diceRolledResources(java.util.List<java.lang.Integer> pnum,
java.util.List<SOCResourceSet> rsrc)
Receive a notification that the dice roll resulted in players gaining resources. |
Uses of SOCResourceSet in soc.game |
---|
Fields in soc.game declared as SOCResourceSet | |
---|---|
static SOCResourceSet |
SOCGame.CARD_SET
the set of resources a player needs to buy a development card |
static SOCResourceSet |
SOCGame.CITY_SET
the set of resources a player needs to build a city |
protected SOCResourceSet |
SOCSpecialItem.cost
Optional cost to buy, use, or build the next level, or null . |
static SOCResourceSet |
SOCGame.EMPTY_RESOURCES
an empty set of resources. |
static SOCResourceSet |
SOCResourceSet.EMPTY_SET
Resource set with zero of each resource type |
private SOCResourceSet |
SOCForceEndTurnResult.gainLoss
Resources gained (returned to cancel piece placement) or lost (discarded), or null. |
(package private) SOCResourceSet |
SOCTradeOffer.get
|
(package private) SOCResourceSet |
SOCTradeOffer.give
|
(package private) SOCResourceSet |
SOCPlayer.lastActionBankTrade_get
For use at server by SOCGame, if the player's previous action this turn was a bank trade, the resources involved. |
(package private) SOCResourceSet |
SOCPlayer.lastActionBankTrade_give
For use at server by SOCGame, if the player's previous action this turn was a bank trade, the resources involved. |
private SOCResourceSet |
SOCPlayer.resources
how many of each resource this player has |
static SOCResourceSet |
SOCGame.ROAD_SET
the set of resources a player needs to build a road |
private SOCResourceSet |
SOCPlayer.rolledResources
Resources gained from dice roll of the current turn. |
SOCResourceSet |
SOCGame.RollResult.sc_piri_fleetAttackRsrcs
When the pirate fleet moves in game scenario SOCGameOption.K_SC_PIRI ,
resources lost when they attack the player with an adjacent settlement or city
(SOCGame.RollResult.sc_piri_fleetAttackVictim ). |
SOCResourceSet |
SOCMoveRobberResult.sc_piri_loot
When the pirate fleet moves in game scenario _SC_PIRI ,
the resources stolen from victim. |
static SOCResourceSet |
SOCGame.SETTLEMENT_SET
the set of resources a player needs to build a settlement |
static SOCResourceSet |
SOCGame.SHIP_SET
the set of resources a player needs to build a ship |
Methods in soc.game that return SOCResourceSet | |
---|---|
SOCResourceSet |
SOCResourceSet.copy()
Make a copy of this resource set. |
SOCResourceSet |
SOCSpecialItem.getCost()
Get the optional cost to buy, use, or build the next level. |
SOCResourceSet |
SOCTradeOffer.getGetSet()
|
SOCResourceSet |
SOCTradeOffer.getGiveSet()
|
SOCResourceSet |
SOCPlayer.getResources()
Get the resources currently held in the player's hand. |
private SOCResourceSet |
SOCGame.getResourcesGainedFromRoll(SOCPlayer player,
int roll)
For SOCGame.rollDice() , figure out what resources a player gets on a given roll,
based on the hexes adjacent to the player's settlements and cities
and based on the robber's position. |
SOCResourceSet |
SOCForceEndTurnResult.getResourcesGainedLost()
Get the resources gained (returned to cancel piece placement, or received from placing at a gold hex) or lost (discarded), if any. |
static SOCResourceSet |
SOCPlayingPiece.getResourcesToBuild(int pieceType)
the set of resources a player needs to build a playing piece. |
SOCResourceSet |
SOCPlayer.getRolledResources()
Resources gained from dice roll of the current turn. |
SOCResourceSet |
SOCGame.playerDiscardOrGainRandom(int pn,
boolean isDiscard)
Force this non-current player to discard or gain resources randomly. |
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 |
SOCPlayer.addRolledResources(SOCResourceSet rolled)
Add to this player's resources and resource-roll totals. |
boolean |
SOCGame.canDiscard(int pn,
SOCResourceSet rs)
|
boolean |
SOCGame.canDoDiscoveryAction(SOCResourceSet pick)
|
boolean |
SOCGame.canMakeBankTrade(SOCResourceSet give,
SOCResourceSet get)
|
boolean |
SOCGame.canPickGoldHexResources(int pn,
SOCResourceSet rs)
Can the player pick these resources from the gold hex? rs. getTotal()
must == SOCPlayer.getNeedToPickGoldHexResources() . |
boolean |
SOCGame.canUndoBankTrade(SOCResourceSet undo_gave,
SOCResourceSet undo_got)
Can we undo this bank trade? True only if the last action this turn was a bank trade with the same resources. |
boolean |
SOCResourceSet.contains(SOCResourceSet sub)
|
void |
SOCGame.discard(int pn,
SOCResourceSet rs)
A player is discarding resources. |
static void |
SOCGame.discardOrGainPickRandom(SOCResourceSet fromHand,
int numToPick,
boolean isDiscard,
SOCResourceSet picks,
java.util.Random rand)
Choose discards at random; does not actually discard anything. |
void |
SOCGame.doDiscoveryAction(SOCResourceSet pick)
perform the Discovery card action |
private void |
SOCGame.getResourcesGainedFromRollPieces(int roll,
SOCResourceSet resources,
SOCResourceSet missedResources,
int robberHex,
java.util.Collection<? extends SOCPlayingPiece> sEnum,
int incr)
Figure out what resources these piece positions would get on a given roll, based on the hexes adjacent to the pieces' node coordinates. |
static boolean |
SOCResourceSet.gte(SOCResourceSet a,
SOCResourceSet b)
Are set A's resources each greater than or equal to set B's? |
static boolean |
SOCResourceSet.lte(SOCResourceSet a,
SOCResourceSet b)
Are set A's resources each less than or equal to set B's? |
void |
SOCGame.makeBankTrade(SOCResourceSet give,
SOCResourceSet get)
perform a bank trade, or undo the last bank trade. |
void |
SOCGame.pickGoldHexResources(int pn,
SOCResourceSet rs)
A player is picking which resources to gain from the gold hex. |
void |
SOCResourceSet.setAmounts(SOCResourceSet set)
copy a resource set into this one. |
void |
SOCSpecialItem.setCost(SOCResourceSet co)
Set or clear the optional cost to buy, use, or build the next level. |
void |
SOCResourceSet.subtract(SOCResourceSet rs)
subtract an entire resource set. |
Constructors in soc.game with parameters of type SOCResourceSet | |
---|---|
SOCForceEndTurnResult(int res,
boolean updateFirstPlayer,
boolean updateLastPlayer,
SOCResourceSet rsrcGained)
Creates a new SOCForceEndTurnResult object, from start states, possibly changing the game's firstplayer or lastplayer. |
|
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. |
|
SOCForceEndTurnResult(int res,
SOCResourceSet gainedLost,
boolean isLoss,
boolean updateFirstPlayer,
boolean updateLastPlayer)
Creates a new SOCForceEndTurnResult object. |
|
SOCSpecialItem(SOCPlayer pl,
int co,
int lv,
java.lang.String sv,
SOCResourceSet cost,
java.lang.String req)
Make a new item, optionally owned by a player, with an optional level and string value. |
|
SOCSpecialItem(SOCPlayer pl,
int co,
SOCResourceSet cost,
java.lang.String req)
Make a new item, optionally owned by a player. |
|
SOCTradeOffer(java.lang.String game,
int from,
boolean[] to,
SOCResourceSet give,
SOCResourceSet get)
The constructor for a SOCTradeOffer |
Uses of SOCResourceSet in soc.message |
---|
Fields in soc.message declared as SOCResourceSet | |
---|---|
private SOCResourceSet |
SOCBankTrade.get
The set of resources being taken from the bank/port |
private SOCResourceSet |
SOCBankTrade.give
The set of resources being given to the bank/port |
private SOCResourceSet |
SOCPickResources.resources
The set of resources picked to be gained |
private SOCResourceSet |
SOCDiscoveryPick.resources
The chosen resources |
private SOCResourceSet |
SOCDiscard.resources
The set of resources being discarded |
Fields in soc.message with type parameters of type SOCResourceSet | |
---|---|
java.util.List<SOCResourceSet> |
SOCDiceResultResources.playerRsrc
playerRsrc(i) is the resource set gained by player playerNum(i) . |
Methods in soc.message that return SOCResourceSet | |
---|---|
SOCResourceSet |
SOCBankTrade.getGetSet()
|
SOCResourceSet |
SOCBankTrade.getGiveSet()
|
SOCResourceSet |
SOCPickResources.getResources()
|
SOCResourceSet |
SOCDiscoveryPick.getResources()
|
SOCResourceSet |
SOCDiscard.getResources()
|
Methods in soc.message with parameters of type SOCResourceSet | |
---|---|
static java.lang.String |
SOCPickResources.toCmd(java.lang.String ga,
SOCResourceSet rs)
PICKRESOURCES sep game sep2 clay sep2 ore sep2 sheep sep2 wheat sep2 wood sep2 unknown |
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)
|
Method parameters in soc.message with type arguments of type SOCResourceSet | |
---|---|
private static int[] |
SOCDiceResultResources.buildIntList(java.util.List<java.lang.Integer> pnum,
java.util.List<SOCResourceSet> rsrc)
Used by server constructor to build an outbound array of ints from these players and these resources. |
Constructors in soc.message with parameters of type SOCResourceSet | |
---|---|
SOCBankTrade(java.lang.String ga,
SOCResourceSet give,
SOCResourceSet get)
Create a BankTrade message. |
|
SOCDiscard(java.lang.String ga,
int pn,
SOCResourceSet rs)
Create a Discard message. |
|
SOCDiscoveryPick(java.lang.String ga,
SOCResourceSet rs)
Create a DiscoveryPick message. |
|
SOCPickResources(java.lang.String ga,
SOCResourceSet rs)
Create a Pick Resources message. |
Constructor parameters in soc.message with type arguments of type SOCResourceSet | |
---|---|
SOCDiceResultResources(java.lang.String gaName,
java.util.List<java.lang.Integer> pn,
java.util.List<SOCResourceSet> rsrc)
Constructor for server to tell clients about players' gained resources. |
Uses of SOCResourceSet in soc.robot |
---|
Fields in soc.robot declared as SOCResourceSet | |
---|---|
SOCResourceSet |
SOCPossiblePickSpecialItem.cost
The resource costs if any, or null |
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 |
SOCTradeTree.resourceSet
|
private SOCResourceSet[] |
SOCBuildingSpeedEstimate.resourcesForRoll
Resource sets gained for each dice roll number (2 to 12). |
Methods in soc.robot that return SOCResourceSet | |
---|---|
static SOCResourceSet |
DiscardStrategy.discard(int numDiscards,
java.util.Stack<SOCPossiblePiece> buildingPlan,
java.util.Random rand,
SOCPlayer ourPlayerData,
SOCRobotParameters robotParameters,
SOCRobotDM decisionMaker,
SOCRobotNegotiator negotiator)
When we have to discard, try to keep the resources needed for our building plan. |
SOCResourceSet |
SOCResSetBuildTypePair.getResources()
|
SOCResourceSet |
SOCResSetBuildTimePair.getResources()
|
SOCResourceSet |
SOCTradeTree.getResourceSet()
|
SOCResourceSet |
SOCPossiblePiece.getResourcesToBuild()
Based on piece type ( SOCPossiblePiece.getType() ), the resources
a player needs to build or buy this possible piece. |
Methods in soc.robot with parameters of type SOCResourceSet | |
---|---|
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 |
protected SOCResSetBuildTimePair |
SOCBuildingSpeedEstimate.calculateRollsAndRsrcFast(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 int |
SOCBuildingSpeedEstimate.calculateRollsFast(SOCResourceSet startingResources,
SOCResourceSet targetResources,
int cutoff,
boolean[] ports)
Figures out how many rolls it would take this player to get the target set of resources, given a starting set. |
protected boolean |
SOCRobotBrain.chooseFreeResources(SOCResourceSet targetResources,
int numChoose,
boolean clearResChoices)
Choose the resources we need most, for playing a Discovery development card or when a Gold Hex number is rolled. |
private boolean |
SOCRobotBrain.chooseFreeResourcesIfNeeded(SOCResourceSet targetResources,
int numChoose,
boolean chooseIfNotNeeded)
Do we need to acquire at least numChoose resources to build our next piece? Choose the resources we need most; used when we want to play a discovery development card or when a Gold Hex number is rolled. |
int[] |
SOCBuildingSpeedEstimate.getEstimatesFromNowAccurate(SOCResourceSet resources,
boolean[] ports)
|
int[] |
SOCBuildingSpeedEstimate.getEstimatesFromNowFast(SOCResourceSet resources,
boolean[] ports)
|
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)
|
SOCTradeOffer |
SOCRobotNegotiator.getOfferToBank(SOCResourceSet targetResources,
SOCResourceSet ourResources)
|
protected SOCTradeOffer |
SOCRobotNegotiator.makeOfferAux(SOCResourceSet giveResourceSet,
SOCResourceSet getResourceSet,
int neededResource)
aux function for make offer |
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 bank trades or port trades to get the target resources, if possible. |
Method parameters in soc.robot with type arguments of type SOCResourceSet | |
---|---|
protected void |
SOCRobotBrain.expandTradeTreeNode(SOCTradeTree currentTreeNode,
java.util.Hashtable<SOCResourceSet,SOCTradeTree> table)
expand a trade tree node |
Constructors in soc.robot with parameters of type SOCResourceSet | |
---|---|
SOCPossiblePickSpecialItem(SOCPlayer pl,
java.lang.String type,
int gi,
int pi,
int eta,
SOCResourceSet cost)
Constructor. |
|
SOCResSetBuildTimePair(SOCResourceSet rs,
int bt)
the constructor |
|
SOCResSetBuildTypePair(SOCResourceSet rs,
int bt)
the constructor |
|
SOCTradeTree(SOCResourceSet set)
this is a constructor |
|
SOCTradeTree(SOCResourceSet set,
SOCTradeTree par)
this is a constructor |
Uses of SOCResourceSet in soc.server |
---|
Methods in soc.server with parameters of type SOCResourceSet | |
---|---|
private void |
SOCGameHandler.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 |
SOCGameHandler.reportRsrcGainGold(SOCGame ga,
SOCPlayer player,
int pn,
SOCResourceSet rsrcs,
boolean includeGoldHexText)
Report to game members what a player picked from the gold hex. |
private void |
SOCGameHandler.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. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |