public class GroundedGameProtocol extends RoundRobinProtocol implements GameProtocol
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
log
Logger
|
Constructor and Description |
---|
GroundedGameProtocol(GroundedGameSystem system)
Creates a new grounded game protocol for the given grounded game systems.
|
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 GroundedGameProtocol(GroundedGameSystem system)
system
- a grounded game system.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