Package edu.wisc.game.sql

## Class Episode.Display

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

- Direct Known Subclasses:
    `EpisodeInfo.ExtendedDisplay`
  Enclosing class:
    Episode

      public class Episode.Display
      extends Object

  Can be sent to the web client in JSON format, where it would be used to display the current state of the episode

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Display​(int _code, Episode.Pick _pick, String _errmsg)` |
    `Display​(int _code, String _errmsg)` | This one is mostly used to report an error, and also to create a return structure for a /display call

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Board` | `getBoard()` | What pieces are on the board now, and what pieces have been removed
    `int` | `getCode()` | On a /move call: Has this move been accepted or rejected? (When returned by /display response, the value is -8).
    `String` | `getErrmsg()` | The error or debug messsage, if any
    `boolean` | `getError()` |
    `String` | `getExplainCounters()` | The "explanation" of the current state of the current rule line
    `int` | `getFinishCode()` | Is this episode still continues (code 0), has stalemated (2), or has the board been cleared (4)?
    `int` | `getNumMovesMade()` | How many move attempts (successful or not) has been made so far
    `RecentKnowledge` | `getRecentKnowledge()` | Keyed by object ID
    `RecentKnowledge` | `getRecentKnowledge0()` |
    `int` | `getRuleLineNo()` | Zero-based position of the line of the rule set that the game engine is currently looking at.
    `RuleSet.ReportedSrc` | `getRulesSrc()` | A structure that describes the rules of the game being played in this episode.
    `Vector<Episode.Pick>` | `getTranscript()` | The list of all move/picks attempts (successful or not) done so far in this episode
    `void` | `setBoard​(Board _b)` |
    `void` | `setCode​(int _code)` |
    `void` | `setErrmsg​(String _msg)` |
    `void` | `setError​(boolean _error)` |
    `void` | `setNumMovesMade​(int _numMovesMade)` |
    `void` | `setRecentKnowledge​(RecentKnowledge x)` | Keyed by object ID
    `void` | `setRecentKnowledge0​(RecentKnowledge x)` |
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### Display

          public Display​(int _code,
                         Episode.Pick _pick,
                         String _errmsg)

    - #### Display

          public Display​(int _code,
                         String _errmsg)

      This one is mostly used to report an error, and also to create a return structure for a /display call

  - ### Method Detail

    - #### getBoard

          public Board getBoard()

      What pieces are on the board now, and what pieces have been removed

    - #### setBoard

          public void setBoard​(Board _b)

    - #### getFinishCode

          public int getFinishCode()

      Is this episode still continues (code 0), has stalemated (2), or has the board been cleared (4)?

    - #### getError

          public boolean getError()

    - #### setError

          public void setError​(boolean _error)

    - #### getCode

          public int getCode()

      On a /move call: Has this move been accepted or rejected? (When returned by /display response, the value is -8).

    - #### setCode

          public void setCode​(int _code)

    - #### getErrmsg

          public String getErrmsg()

      The error or debug messsage, if any

    - #### setErrmsg

          public void setErrmsg​(String _msg)

    - #### getNumMovesMade

          public int getNumMovesMade()

      How many move attempts (successful or not) has been made so far

    - #### setNumMovesMade

          public void setNumMovesMade​(int _numMovesMade)

    - #### getTranscript

          public Vector<Episode.Pick> getTranscript()

      The list of all move/picks attempts (successful or not) done so far in this episode

    - #### getRecentKnowledge

          public RecentKnowledge getRecentKnowledge()

      Keyed by object ID

    - #### setRecentKnowledge

          public void setRecentKnowledge​(RecentKnowledge x)

      Keyed by object ID

    - #### getRecentKnowledge0

          public RecentKnowledge getRecentKnowledge0()

    - #### setRecentKnowledge0

          public void setRecentKnowledge0​(RecentKnowledge x)

    - #### getRulesSrc

          public RuleSet.ReportedSrc getRulesSrc()

      A structure that describes the rules of the game being played in this episode.

    - #### getExplainCounters

          public String getExplainCounters()

      The "explanation" of the current state of the current rule line

    - #### getRuleLineNo

          public int getRuleLineNo()

      Zero-based position of the line of the rule set that the game engine is currently looking at. This line will be the first line the engine will look at when accepting the player's next move.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`