public class Offer extends Action
Modifier and Type | Field and Description |
---|---|
protected Bid |
bid
Bid to be offered to the opponent.
|
Constructor and Description |
---|
Offer(Agent agent,
Bid bid)
Creates an action symbolizing an offer to the opponent.
|
Offer(AgentID agentID,
Bid bid)
Creates an action symbolizing an offer for the opponent.
|
Offer(Bid bid)
Creates an action symbolizing an offer for the opponent.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Bid |
getBid()
Returns the bid offered by the agent which
created this offer.
|
int |
hashCode() |
java.lang.String |
toString()
Enforces that actions implements a string-representation.
|
getAgent, getBidFromAction
protected Bid bid
public Offer(AgentID agentID, Bid bid)
agentID
- id of the agent which created the offer.bid
- for the opponent.public Offer(Bid bid)
bid
- for the opponent.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- object to which this object is compared.public Bid getBid()