Class PlayerResponse


  • public class PlayerResponse
    extends ResponseBase
    The object returned by the /player call. This is the call that's used at the beginning (or resumption) of a series, to create a new player entry in the database or find an existing one.
    • Constructor Detail

      • PlayerResponse

        public PlayerResponse​(String pid,
                              String exp,
                              int uid)
      • PlayerResponse

        public PlayerResponse​(String pid,
                              String exp,
                              int uid,
                              boolean debug)
        Registers a new player, or finds an existing player record. In the former case, the player will be assigned to the specified experiment plan; in the latter case, we verify that the existing player has already been assigned to that plan.
        Parameters:
        exp - The experiment plan that the player must play.
        pid - The player ID. If it is not supplied, the uid must be supplied, and this method will create a semi-random player ID.
        uid - The numeric ID of the repeat user who creates this playerId for himself. If negative, this parameter is ignored, as this is an M-Turker etc, and not a repeat user.
        debug - If true, set this.playerInfo. (This is useful in Pseudo-Learning bot)
    • Method Detail

      • getNewlyRegistered

        public boolean getNewlyRegistered()
      • getTrialListId

        public String getTrialListId()
      • getTrialList

        public TrialList getTrialList()
      • getPlayerId

        public String getPlayerId()
      • setPlayerId

        public void setPlayerId​(String _playerId)
      • getPlayerInfo

        public PlayerInfo getPlayerInfo()
      • getAlreadyFinished

        public boolean getAlreadyFinished()
        True if this player has finished all episodes he could play. This means that the most recent episode has been completed, and no more new episodes can be created.
      • getCompletionCode

        public String getCompletionCode()
      • getCompletionMode

        public int getCompletionMode()
      • getExperimentPlan

        public String getExperimentPlan()
      • getIsCoopGame

        public boolean getIsCoopGame()
        Are we playing a cooperative two-player game (2PG)?
      • getIsAdveGame

        public boolean getIsAdveGame()
        Are we playing an adversarial 2PG?
      • getIsTwoPlayerGame

        public boolean getIsTwoPlayerGame()
        Are we playing a 2PG? (A 2PG may be adversarial or cooperative)
      • getNeedChat

        public boolean getNeedChat()
        Do we need a between-player chat element in the GUI? (In 2PG only, based on para.chat