Class GameToCheckBehaviour

java.lang.Object
jade.core.behaviours.Behaviour
Jade.Behaviours.Arbiter.GameToCheckBehaviour
All Implemented Interfaces:
jade.util.leap.Serializable, Serializable

public class GameToCheckBehaviour 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This behaviour acts in a four way interaction with the player agents: - The arbiter receives the GridMessage from a player regarding a legal move that he wants to send to the other player - The arbiter can notice that the move brings to a state of WIN, LOSE and informs the two that the game is over - The arbiter can notice that the move brings to a state of TIE and informs the two that the game must go on - If none of the above happens, the arbiter can continue the game, calling the GameToCheckBehaviour again
    boolean
    Returns true if the game has been checked, false otherwise If the game has been checked, the behaviour is removed.

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GameToCheckBehaviour

      public GameToCheckBehaviour()
  • Method Details

    • action

      public void action()
      This behaviour acts in a four way interaction with the player agents: - The arbiter receives the GridMessage from a player regarding a legal move that he wants to send to the other player - The arbiter can notice that the move brings to a state of WIN, LOSE and informs the two that the game is over - The arbiter can notice that the move brings to a state of TIE and informs the two that the game must go on - If none of the above happens, the arbiter can continue the game, calling the GameToCheckBehaviour again
      Specified by:
      action in class jade.core.behaviours.Behaviour
    • done

      public boolean done()
      Returns true if the game has been checked, false otherwise If the game has been checked, the behaviour is removed.
      Specified by:
      done in class jade.core.behaviours.Behaviour
      Returns:
      boolean