public class DirectGameProtocol extends SynchronousProtocol implements GameProtocol
UNLIMITED_EXECUTION
Constructor and Description |
---|
DirectGameProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem) |
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
getUtility(Agent agent)
Returns the utility of the given agent for
the final situation.
|
Agent |
getWinner()
If the game has a winner, this methods returns it.
|
boolean |
hasWinner()
Returns "true" if the game has finished and a winner
is determined, otherwise it returns "false"
|
java.lang.String |
toString() |
doStep, hasTerminated
hasPerformedNoOperation, setHasPerformedNoOperation
addProtocolListener, getMultiAgentSystem, notifyActionPerformed, notifyTerminated, removeProtocolListener, step
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addProtocolListener, removeProtocolListener
public DirectGameProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem)
public boolean hasWinner()
GameProtocol
hasWinner
in interface GameProtocol
public Agent getWinner()
GameProtocol
getWinner
in interface GameProtocol
public java.lang.Double getUtility(Agent agent)
GameProtocol
getUtility
in interface GameProtocol
agent
- some agent.public java.lang.String toString()
toString
in class java.lang.Object