TurnTracker¶
-
public interface
TurnTracker
¶ An interface for classes that track whose turn it is
Author: The Condor
Methods¶
addPlayer¶
hasHadTurnBefore¶
-
boolean
hasHadTurnBefore
(int playerNumber)¶ Check whether the player has already had a turn this episode.
Parameters: - playerNumber –
Returns: 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¶
isPlayersTurn¶
-
boolean
isPlayersTurn
(int playerNumber)¶ 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.
Parameters: - playerNumber – An player.
Returns: true if it is the turn of that player, false otherwise.