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
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
getDisplayEpisodeNo()
Introduced in ver.int
getDisplaySeriesNo()
The number of the current super-series (zero-based) among all super-series in the trial list.int
getEpisodeNo()
The number of this episode within the current (internal) series (zero-based).Vector<Boolean>
getFaces()
int
getFactorAchieved()
int
getFactorPromised()
boolean
getGuessSaved()
True if the player's guess has been recorded at the end of this episodeParaSet.Incentive
getIncentive()
boolean
getJustReachedX2()
boolean
getJustReachedX4()
int
getLastStretch()
Double
getMovesLeftToStayInBonus()
If it's not a bonus episode, null is returned.int[]
getRewardRange()
int[][]
getRewardsAndFactorsPerSeries()
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.String
xgetRewardsAndFactorsPerSeriesString()
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
-
Method Details
-
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. -
getDisplaySeriesNo
public int getDisplaySeriesNo()The number of the current super-series (zero-based) among all super-series in the trial list. This is used in the "Rule XXX" display element in the GUI. (Introduced in GS ver. 5.008) -
getEpisodeNo
public int getEpisodeNo()The number of this episode within the current (internal) series (zero-based). This can also be interpreted as the number of the preceding episodes (completed or given up) in this series. -
getDisplayEpisodeNo
public int getDisplayEpisodeNo()Introduced in ver. 5.008, this represent the number of this episode within the current super-series (zero-based). -
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
- 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.
-
getRewardRange
public int[] getRewardRange() -
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
-
getRuleSetName
-
getIncentive
-
getLastStretch
public int getLastStretch() -
getFaces
-
getRewardsAndFactorsPerSeries
public int[][] getRewardsAndFactorsPerSeries() -
xgetRewardsAndFactorsPerSeriesString
-
getJustReachedX2
public boolean getJustReachedX2() -
getJustReachedX4
public boolean getJustReachedX4() -
getFactorAchieved
public int getFactorAchieved() -
getFactorPromised
public int getFactorPromised()
-