.. java:import:: edu.cwru.sepia.agent Agent TurnTracker =========== .. java:package:: edu.cwru.sepia.environment :noindex: .. java:type:: public interface TurnTracker An interface for classes that track whose turn it is :author: The Condor Methods ------- addPlayer ^^^^^^^^^ .. java:method:: void addPlayer(Integer playerNumber) :outertype: TurnTracker Start tracking an additional player :param playerNumber: The playerNumber of the player to start tracking. hasHadTurnBefore ^^^^^^^^^^^^^^^^ .. java:method:: boolean hasHadTurnBefore(int playerNumber) :outertype: TurnTracker Check whether the player has already had a turn this episode. :param playerNumber: :return: true if there was a time after the last call of newEpisodeAndStep() but before the last call of newStep(), during which the tracker was tracking that playerNumber and isAgentsTurn() on an agent with the chosen player number could ever have returned true, false otherwise isAgentsTurn ^^^^^^^^^^^^ .. java:method:: boolean isAgentsTurn(Agent agent) :outertype: TurnTracker Check whether it is an agent's turn. IE: Whether the agent should get a state and a chance to send actions during this step. :param agent: An agent. :return: true if the agent controls a player whose turn it is, false otherwise. isPlayersTurn ^^^^^^^^^^^^^ .. java:method:: boolean isPlayersTurn(int playerNumber) :outertype: TurnTracker Check whether it is an player's turn. IE: Whether the agent's with that player number should get a state and a chance to send actions during this step. :param playerNumber: An player. :return: true if it is the turn of that player, false otherwise. newEpisodeAndStep ^^^^^^^^^^^^^^^^^ .. java:method:: void newEpisodeAndStep() :outertype: TurnTracker Advance to the first step of a new episode. newStep ^^^^^^^ .. java:method:: void newStep() :outertype: TurnTracker Go to the next step in the current episode. removePlayer ^^^^^^^^^^^^ .. java:method:: void removePlayer(Integer playerNumber) :outertype: TurnTracker Stop tracking a player :param playerNumber: The playerNumber of the player to stop tracking.