public class GeneralNegotiator
extends java.lang.Object
Constructor and Description |
---|
GeneralNegotiator(java.lang.String username,
GameSpec game,
javax.websocket.Session session)
Constructor for GeneralUser
|
Modifier and Type | Method and Description |
---|---|
GeneralNegotiator |
getAdversary()
returns the negotiator's adversary
|
History |
getHistory()
returns this negotiator's history.
|
java.lang.String |
getName()
returns the negotiator's name.
|
javax.websocket.Session |
getSession()
returns the web session that's currently running.
|
protected void |
pairWith(GeneralNegotiator negotiator)
pairs two negotiators by making them adversaries of each other.
|
protected void |
setAdversary(GeneralNegotiator negotiator)
sets a negotiator's adversary
|
void |
setGameSpec(GameSpec spec)
sets the GameSpec used by the negotiator.
|
protected void |
setHistory(History history)
replaces this negotiator's history with a new history
|
protected GameSpec game
public GeneralNegotiator(java.lang.String username, GameSpec game, javax.websocket.Session session)
username
- the specified username for the sessiongame
- the gamespec being used in the current game.session
- the web session that's currently active.public java.lang.String getName()
public GeneralNegotiator getAdversary()
protected void setAdversary(GeneralNegotiator negotiator)
negotiator
- the entity to be set as this negotiator's adversary.protected void pairWith(GeneralNegotiator negotiator)
negotiator
- the negotiator to be paired with the method caller.public javax.websocket.Session getSession()
public History getHistory()
protected void setHistory(History history)
history
- the new history to be used.public void setGameSpec(GameSpec spec)
spec
- the GameSpec to be used.