Package edu.wisc.game.sql
Class EpisodeInfo
java.lang.Object
edu.wisc.game.sql.Episode
edu.wisc.game.sql.EpisodeInfo
@Entity public class EpisodeInfo extends Episode
An EpisodeInfo instance extends an Episode, containing additional
information related to it being played as part of an
experiment. That includes support for creating an Episode based on
a parameter set, and for managing earned reward amount.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
EpisodeInfo.ExtendedDisplay
Provides some extra information related to the episode's context within the experiment.Nested classes/interfaces inherited from class edu.wisc.game.sql.Episode
Episode.CODE, Episode.Display, Episode.FINISH_CODE, Episode.Move, Episode.OutputMode, Episode.Pick
-
Field Summary
Fields Modifier and Type Field Description static HashMap<String,EpisodeInfo>
globalAllEpisodes
-
Constructor Summary
Constructors Constructor Description EpisodeInfo()
Dummy episode, used for sending error mesages onlyEpisodeInfo(Game game, ParaSet _para)
-
Method Summary
Modifier and Type Method Description void
cache()
EpisodeInfo.ExtendedDisplay
doMove(int y, int x, int by, int bx, int _attemptCnt)
Calls Episode.doMove, and then does various adjustments related to this episode's role in the experiment plan.EpisodeInfo.ExtendedDisplay
doPick(int y, int x, int _attemptCnt)
Evaluate a pick attemptEpisodeInfo.ExtendedDisplay
dummyDisplay(int _code, String _errmsg)
Board
getCurrentBoard()
Shows tHe current board (including dropped pieces, which are labeled as such)String
getGuess()
int
getGuessConfidence()
boolean
getGuessSaved()
int
getLastStretch()
PlayerInfo
getPlayer()
int
getSeriesNo()
int
getXFactor()
boolean
isBonus()
static EpisodeInfo
locateEpisode(String eid)
EpisodeInfo.ExtendedDisplay
mkDisplay()
Builds a display to be sent out over the web UIString
report()
Concise report, handy for debuggingvoid
saveGuessToFile(File f, String guessText, int confidence)
Records the player-provided "guess" to a CSV filevoid
setBonus(boolean _bonus)
void
setGuess(String _guess)
Sets the guess value, truncating it if necessaryvoid
setGuessConfidence(int _guessConfidence)
void
setGuessSaved(boolean _guessSaved)
void
setLastStretch(int _lastStretch)
void
setPlayer(PlayerInfo _player)
void
setSeriesNo(int _seriesNo)
void
setXFactor(int _xFactor)
ParaSet
xgetPara()
Methods inherited from class edu.wisc.game.sql.Episode
accept, doHtmlDisplay, getEpisodeId, getNPiecesStart, getStartTime, getVersion, graphicDisplay, graphicDisplay, graphicDisplayAscii, mkDisplay0, onBoard, playGame, randomWord, setEpisodeId, setNPiecesStart, setStartTime
-
Field Details
-
Constructor Details
-
EpisodeInfo
public EpisodeInfo()Dummy episode, used for sending error mesages only -
EpisodeInfo
-
-
Method Details
-
getPlayer
-
setPlayer
-
locateEpisode
-
cache
public void cache() -
isBonus
public boolean isBonus() -
setBonus
public void setBonus(boolean _bonus) -
getSeriesNo
public int getSeriesNo() -
setSeriesNo
public void setSeriesNo(int _seriesNo) -
getGuessSaved
public boolean getGuessSaved() -
setGuessSaved
public void setGuessSaved(boolean _guessSaved) -
getGuess
-
setGuess
Sets the guess value, truncating it if necessary -
getGuessConfidence
public int getGuessConfidence() -
setGuessConfidence
public void setGuessConfidence(int _guessConfidence) -
getLastStretch
public int getLastStretch() -
setLastStretch
public void setLastStretch(int _lastStretch) -
getXFactor
public int getXFactor() -
setXFactor
public void setXFactor(int _xFactor) -
xgetPara
-
doMove
public EpisodeInfo.ExtendedDisplay doMove(int y, int x, int by, int bx, int _attemptCnt) throws IOExceptionCalls Episode.doMove, and then does various adjustments related to this episode's role in the experiment plan. If the player has failed to complete a bonus episode on time, this is the place that sets the "lost" flag.- Overrides:
doMove
in classEpisode
- Throws:
IOException
-
doPick
Description copied from class:Episode
Evaluate a pick attempt- Overrides:
doPick
in classEpisode
- Throws:
IOException
-
report
Concise report, handy for debugging -
getCurrentBoard
Shows tHe current board (including dropped pieces, which are labeled as such)- Overrides:
getCurrentBoard
in classEpisode
-
mkDisplay
Builds a display to be sent out over the web UI -
dummyDisplay
-
saveGuessToFile
Records the player-provided "guess" to a CSV file
-