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 classEpisodeInfo.ExtendedDisplayProvides 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 voidcache()EpisodeInfo.ExtendedDisplaydoMove(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.ExtendedDisplaydoPick(int y, int x, int _attemptCnt)Evaluate a pick attemptEpisodeInfo.ExtendedDisplaydummyDisplay(int _code, String _errmsg)BoardgetCurrentBoard()Shows tHe current board (including dropped pieces, which are labeled as such)StringgetGuess()intgetGuessConfidence()booleangetGuessSaved()intgetLastStretch()PlayerInfogetPlayer()intgetSeriesNo()intgetXFactor()booleanisBonus()static EpisodeInfolocateEpisode(String eid)EpisodeInfo.ExtendedDisplaymkDisplay()Builds a display to be sent out over the web UIStringreport()Concise report, handy for debuggingvoidsaveGuessToFile(File f, String guessText, int confidence)Records the player-provided "guess" to a CSV filevoidsetBonus(boolean _bonus)voidsetGuess(String _guess)Sets the guess value, truncating it if necessaryvoidsetGuessConfidence(int _guessConfidence)voidsetGuessSaved(boolean _guessSaved)voidsetLastStretch(int _lastStretch)voidsetPlayer(PlayerInfo _player)voidsetSeriesNo(int _seriesNo)voidsetXFactor(int _xFactor)ParaSetxgetPara()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:
doMovein classEpisode- Throws:
IOException
-
doPick
Description copied from class:EpisodeEvaluate a pick attempt- Overrides:
doPickin classEpisode- Throws:
IOException
-
report
Concise report, handy for debugging -
getCurrentBoard
Shows tHe current board (including dropped pieces, which are labeled as such)- Overrides:
getCurrentBoardin classEpisode
-
mkDisplay
Builds a display to be sent out over the web UI -
dummyDisplay
-
saveGuessToFile
Records the player-provided "guess" to a CSV file
-