Package Jade.Behaviours.MasterArbiter
Class PlayGameBehaviour
java.lang.Object
jade.core.behaviours.Behaviour
Jade.Behaviours.MasterArbiter.PlayGameBehaviour
- All Implemented Interfaces:
jade.util.leap.Serializable
,Serializable
public class PlayGameBehaviour
extends jade.core.behaviours.Behaviour
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour
jade.core.behaviours.Behaviour.RunnableChangedEvent
-
Field Summary
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
-
Constructor Summary
ConstructorDescriptionPlayGameBehaviour
(jade.core.AID[] arbiterAgents, jade.core.AID[] playerAgents) -
Method Summary
Modifier and TypeMethodDescriptionvoid
action()
This behaviour is varies depending on the step of the game: - If the step is 0, the Master Arbiter assigns the arbiters to the players - If the step is > 0, the Master Arbiter waits that every player has finished the game to start the next round If the number of arbiters or player are not enough to play the tournament correctly, the Master Arbiter will end the tournament and destroy the agents.boolean
done()
The game has ended: the Master Arbiter announces the winner and destroys the agents.Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, handle, handleBlockEvent, handleRestartEvent, isRunnable, onEnd, onStart, reset, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState
-
Constructor Details
-
PlayGameBehaviour
public PlayGameBehaviour(jade.core.AID[] arbiterAgents, jade.core.AID[] playerAgents)
-
-
Method Details
-
action
public void action()This behaviour is varies depending on the step of the game: - If the step is 0, the Master Arbiter assigns the arbiters to the players - If the step is > 0, the Master Arbiter waits that every player has finished the game to start the next round If the number of arbiters or player are not enough to play the tournament correctly, the Master Arbiter will end the tournament and destroy the agents.- Specified by:
action
in classjade.core.behaviours.Behaviour
-
done
public boolean done()The game has ended: the Master Arbiter announces the winner and destroys the agents.- Specified by:
done
in classjade.core.behaviours.Behaviour
- Returns:
- boolean
-