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
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 TypeMethodDescriptionint
The number of bonus episodes that have been completed (or given up) prior to the beginning of this episode.boolean
This is set to true if an "Activate Bonus" button can be displayed now, i.e.int
Introduced in ver.int
The number of the current super-series (zero-based) among all super-series in the trial list.int
The number of this episode within the current (internal) series (zero-based).getFaces()
int
int
boolean
True if this player's guess has been recorded at the end of this episode.boolean
boolean
double
getLastR()
int
int
getMover()
What is the role of the player in the episode? In 1PG it's always 0; in 2PG, it's 0 for player 0 of the pair (the one who owns all episodes), and 1 for player 1If it's not a bonus episode, null is returned.boolean
This flag is true if the episode playable, but it's not this player's turn yet.int[]
int[][]
int
The number of the current series (zero-based) among all series in the trial list.int
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
The total reward earned by this player so far, including the regular rewards and any bonuses, for all episodes.int
Describes the possible transitions (another episode in the same series, new series, etc) which can be effected after this episode.boolean
isBonus()
In games with the BONUS incentive scheme, true if this episode is part of a bonus subseries.void
setMover
(int _mover) void
setMustWait
(boolean _mustWait) 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
-
getMover
public int getMover()What is the role of the player in the episode? In 1PG it's always 0; in 2PG, it's 0 for player 0 of the pair (the one who owns all episodes), and 1 for player 1 -
setMover
public void setMover(int _mover) -
getMustWait
public boolean getMustWait()This flag is true if the episode playable, but it's not this player's turn yet. The caller must wait for a "READY" signal to arrive via the websocket connection, and then repeat the /display call. -
setMustWait
public void setMustWait(boolean _mustWait) -
isBonus
public boolean isBonus()In games with the BONUS incentive scheme, 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. -
getTotalRewardEarnedPartner
public int getTotalRewardEarnedPartner() -
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 this player's guess has been recorded at the end of this episode. In a 2PG, this refers to the player identified by the "mover" field. -
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() -
getLastR
public double getLastR() -
getFaces
-
getFacesMine
-
getRewardsAndFactorsPerSeries
public int[][] getRewardsAndFactorsPerSeries() -
xgetRewardsAndFactorsPerSeriesString
-
getJustReachedX2
public boolean getJustReachedX2() -
getJustReachedX4
public boolean getJustReachedX4() -
getFactorAchieved
public int getFactorAchieved() -
getFactorPromised
public int getFactorPromised()
-