Package edu.wisc.game.sql

## Class EpisodeInfo.ExtendedDisplay

- java.lang.Object
- - edu.wisc.game.sql.Episode.Display
  - - edu.wisc.game.sql.EpisodeInfo.ExtendedDisplay

- Enclosing class:
    EpisodeInfo

      public class EpisodeInfo.ExtendedDisplay
      extends Episode.Display

  Provides some extra information related to the episode's context within the experiment. The assumption is that this episode is the most recent ones. This structure is converted to JSON and sent to the GUI client as the response of the /display and /move calls, as well as as one of the components of the responses to the /newEpisode and /mostRecentEpisosde calls. The list of the fields here is based on what Kevin said the GUI tool needs to render the board and messages around it.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getBonusEpisodeNo()` | The number of bonus episodes that have been completed (or given up) prior to the beginning of this episode.
    `boolean` | `getCanActivateBonus()` | This is set to true if an "Activate Bonus" button can be displayed now, i.e.
    `int` | `getEpisodeNo()` | The number of this episode within the current series (zero-based).
    `boolean` | `getGuessSaved()` | True if the player's guess has been recorded at the end of this episode
    `Double` | `getMovesLeftToStayInBonus()` | If it's not a bonus episode, null is returned.
    `String` | `getRuleSetName()` |
    `int` | `getSeriesNo()` | The number of the current series (zero-based) among all series in the trial list.
    `int` | `getTotalBoardsPredicted()` | Based on the current situation, what is the maximum number of episodes that can be run within the current series? (Until max_boards is reached, if in the main subseries, or until the bonus is earned, if in the bonus subseries).
    `int` | `getTotalRewardEarned()` | The total reward earned by this player so far, including the regular rewards and any bonuses, for all episodes.
    `PlayerInfo.TransitionMap` | `getTransitionMap()` | Describes the possible transitions (another episode in the same series, new series, etc) which can be effected after this episode.
    `String` | `getTrialListId()` |
    `boolean` | `isBonus()` | True if this episode is part of a bonus subseries.

    - ### Methods inherited from class edu.wisc.game.sql.Episode.Display

      `getBoard, getCode, getErrmsg, getError, getExplainCounters, getFinishCode, getNumMovesMade, getRuleLineNo, getRulesSrc, getTranscript, setBoard, setCode, setErrmsg, setError, setNumMovesMade`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isBonus

          public boolean isBonus()

      True if this episode is part of a bonus subseries.

    - #### getTotalRewardEarned

          public int getTotalRewardEarned()

      The total reward earned by this player so far, including the regular rewards and any bonuses, for all episodes.

    - #### getSeriesNo

          public int getSeriesNo()

      The number of the current series (zero-based) among all series in the trial list. This can also be interpreted as the number of the preceding series that have been completed or given up by this player.

    - #### getEpisodeNo

          public int getEpisodeNo()

      The number of this episode within the current series (zero-based). This can also be interpreted as the number of the preceding episodes (completed or given up) in this series.

    - #### getBonusEpisodeNo

          public int getBonusEpisodeNo()

      The number of bonus episodes that have been completed (or given up) prior to the beginning of this episode.

    - #### getCanActivateBonus

          public boolean getCanActivateBonus()

      This is set to true if an "Activate Bonus" button can be displayed now, i.e. the player is eligible to start bonus episodes, but has not done that yet

    - #### getTotalBoardsPredicted

          public int getTotalBoardsPredicted()

      Based on the current situation, what is the maximum number of episodes that can be run within the current series? (Until max_boards is reached, if in the main subseries, or until the bonus is earned, if in the bonus subseries).

    - #### getGuessSaved

          public boolean getGuessSaved()

      True if the player's guess has been recorded at the end of this episode

    - #### getMovesLeftToStayInBonus

          public Double getMovesLeftToStayInBonus()

      - If it's not a bonus episode, null is returned.
      - If it's a bonus episode, we return the number X such that if, starting from this point, the player must clear the board in no more than X additional moves in order not to be ejected from the bonus series. The number 0, or a negative number, means that, unless the board has just been cleared, the player will be ejected from the bonus series at the end of the current episode (i.e. once he eventually clears it). A negative number means that the player has already made more move attempts than he's allowed to make in order to stay in the bonus series.

    - #### getTransitionMap

          public PlayerInfo.TransitionMap getTransitionMap()

      Describes the possible transitions (another episode in the same series, new series, etc) which can be effected after this episode. This can be used to generate transition buttons. This field appears in JSON (i.e. is not null) only if the episode is finished, i.e. finishCode==0.

    - #### getTrialListId

          public String getTrialListId()

    - #### getRuleSetName

          public String getRuleSetName()