JSettlers v1.0.6 API
Built ${date}

soc.game
Class SOCTradeOffer

java.lang.Object
  extended bysoc.game.SOCTradeOffer
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SOCTradeOffer
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class represents a trade offer in Settlers of Catan

See Also:
Serialized Form

Constructor Summary
SOCTradeOffer(SOCTradeOffer offer)
          make a copy of this offer
SOCTradeOffer(java.lang.String game, int from, boolean[] to, SOCResourceSet give, SOCResourceSet get)
          The constructor for a SOCTradeOffer
 
Method Summary
 int getFrom()
           
 java.lang.String getGame()
           
 SOCResourceSet getGetSet()
           
 SOCResourceSet getGiveSet()
           
 boolean[] getTo()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SOCTradeOffer

public SOCTradeOffer(java.lang.String game,
                     int from,
                     boolean[] to,
                     SOCResourceSet give,
                     SOCResourceSet get)
The constructor for a SOCTradeOffer

Parameters:
game - the name of the game in which this offer was made
from - the number of the player making the offer
to - a boolean array where 'true' means that the offer is being made to the player with the same number as the index of the 'true'
give - the set of resources being given
get - the set of resources being asked for

SOCTradeOffer

public SOCTradeOffer(SOCTradeOffer offer)
make a copy of this offer

Parameters:
offer - the trade offer to copy
Method Detail

getGame

public java.lang.String getGame()
Returns:
the name of the game

getFrom

public int getFrom()
Returns:
the number of the player that made the offer

getTo

public boolean[] getTo()
Returns:
the boolean array representing to whom this offer was made

getGiveSet

public SOCResourceSet getGiveSet()
Returns:
the set of resources offered

getGetSet

public SOCResourceSet getGetSet()
Returns:
the set of resources wanted in exchange

toString

public java.lang.String toString()
Returns:
a human readable string of data

JSettlers v1.0.6 API
Built ${date}